vba
Microsoft Office Training verified by visa - mastercard securecode about microsoft training company london ukadd this page to your favourites/bookmarksAdd to favourites
view a printable version of this pagePrintable version
email this page to somebodyEmail this page
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and Help » VBA

VBA

The UK's most regular instructor-led training courses.
Training information: excel training course · Excel advanced · VBA training in London

resolvedResolved · Low Priority · Version 2003

VBA

Seigo has attended:
Excel VBA course

by - delegate Seigo [1 post] (2008 May 1 Thu, 16:52) replyReply

How would you count things by colour or format

Excel Intermediate 1 day course
Version Date Location Places
available
Book Next place rate:
Card Invoice
2007 2008 Jul 8 Tue Bloomsbury 0 FULL    
2003/XP 2008 Jul 8 Tue Bayswater 1 book now £195 £205
2003/XP 2008 Jul 9 Wed Bloomsbury 3 book now £210 £215
2003/XP 2008 Jul 15 Tue Bloomsbury 3 book now £210 £215
2003/XP 2008 Jul 15 Tue Tooting 0 FULL    
2007 2008 Jul 16 Wed Bloomsbury 7 book now £202 £224
Full Schedule: See all 160 Excel Intermediate course dates.
Bookings currently available until 25th November 2009.

RE: VBA

by - trainer Carlos gold contributer[360 posts] (2008 Jun 3 Tue, 10:58) replyReply

Hi Seigo

The following function counts the cells in a range with the same colour background or text depending on the option you set up


Public Function CountByColour(MyRange As Range, _
MyColorIndex As Integer, _
Optional OfText As Boolean = False) As Long

' This function return the number of cells in MyRange with
' a background color, or if OfText is True a font color,
' equal to MyColorIndex.

Dim RangeVar As Range

Application.Volatile True

For Each RangeVar In MyRange.Cells

If OfText = True Then

CountByColour = CountByColour - _
(RangeVar.Font.ColorIndex = MyColorIndex)

Else

CountByColour = CountByColour - _
(RangeVar.Interior.ColorIndex = MyColorIndex)

End If

Next RangeVar

End Function


Hope this helps

Carlos


Related articles

· Microsoft Excel Courses Teach Advanced Macro Techniques
· Crazy Things People Have Done With Excel
· Identifying Suitable Candidates For VBA For Excel Training
· Advanced Excel Training - takes you to the next level
· Customized Financial Excel Courses in London

Please browse our web site to find out more about
excel training course and other Microsoft training courses.

Excel tip:

Transpose text

You can transpose any range of cells, turning the columns into rows and the rows into columns. Just follow these steps:

Select the range.

Click the Copy button on the Standard toolbar to copy it to the Clipboard.

Select a cell outside of the range you copied.

Select Paste Special from the Edit menu.

In the Paste Special dialog box, click Transpose, then OK.

View all Excel hints and tips

Institute of IT Training - Accredited Training Provider Institute of IT Training - Accredited Training Provider Prodigy Platinum Learning Partner Microsoft Office Specialist Authorised Testing Centre

Microsoft Registered Partner
microsoft office
ms office project server

Association of Computer Trainers Valid HTML 4.01 Transitional
Valid CSS Markup

secure online payments - visa - mastercard

Mini sitemap. These are the main areas of our web site. Full sitemap.

Training by application Main information pages See also

Access courses
DreamWeaver courses
Excel courses
MS Project courses
Outlook courses
PowerPoint courses
VBA courses
Word courses
(more...)

Public scheduled courses
On-site training
Closed company courses

Microsoft Office training
Pricing and availability
Training schedule
Training venues

Access training
Dreamweaver training
Excel training
MS Project training
PowerPoint training

London Computer Training
Computer Training London

Microsoft Access training
Microsoft Excel training
Microsoft Project training
Microsoft Outlook training
Microsoft Powerpoint training
Microsoft Word training

Time Management Course London

Interested in Access training? Please see the following pages:
microsoft access courses · microsoft training access course
microsoft+access+training · access courses in london

Training Information
AddThis Social Bookmark Button What's this?
Add to Del.icio.us Add to Facebook Add to Digg Add to Reddit Add to Google Add to Yahoo Add to Diigo Add to Mr. Wong Add to Linkarena Add to Power Oldie Add to Folkd Add to Jumptags Add to Upchuckr Add to Simpy Add to StumbleUpon Add to Slashdot Add to Netscape Add to Furl Add to Spurl Add to Blinklist Add to Blogmarks Add to Technorati Add to Newsvine Add to Blinkbits Add to Ma.Gnolia Add to Smarking Add to Netvouz