Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default COUNT HIGHLIGHTED CELLS IN A ROW ?

I would like figure out how to add highlighted cells in a row with a
designated cell for the sum. If anyone can help it would make my spreadsheet
much more effective and easier to manage.
Thanks
topcat
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default COUNT HIGHLIGHTED CELLS IN A ROW ?

Hi,

You can do it with a UDF. Alt + F11 to open VB editor. Right click 'This
Workbook' and insert module and paste this in

Function SumColours(sumrange As range, colour As Long)
For Each c In sumrange
If c.Interior.ColorIndex = colour And IsNumeric(c) Then
mytot = mytot + c
End If
Next
SumColours = mytot
End Function

On the worksheet call with
=sumcolours(A1:A100,3)

Where A1:A100 is the range to sum
3 is the colour (Red)

If you dont know the colour numbers record a macro of colouring cells


Mike


"Stephen the computer dummy" wrote:

I would like figure out how to add highlighted cells in a row with a
designated cell for the sum. If anyone can help it would make my spreadsheet
much more effective and easier to manage.
Thanks
topcat

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to count number of highlighted cells in column Mike K[_2_] Excel Discussion (Misc queries) 5 May 9th 07 08:41 PM
Is there a way to count the number of highlighted cells in a col? Alicia Excel Discussion (Misc queries) 2 February 23rd 06 05:52 PM
count highlighted cells PASSWORD37 Excel Discussion (Misc queries) 1 February 7th 06 04:34 AM
How do I count cells that have are highlighted a certain color? NicoleE Excel Worksheet Functions 1 September 2nd 05 09:14 PM
Count highlighted cells Robbie in Houston Excel Worksheet Functions 2 February 16th 05 12:52 AM


All times are GMT +1. The time now is 06:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"