Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
David
 
Posts: n/a
Default Sum cells in excel if shaded

How do I conditionally sum a set of cells if I have them highlighted?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Norman Jones
 
Posts: n/a
Default Sum cells in excel if shaded

Hi David,

See Chip Pearson's conting and summing functions at:

http://www.cpearson.com/excel/colors.htm


---
Regards,
Norman



"David" wrote in message
...
How do I conditionally sum a set of cells if I have them highlighted?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Niek Otten
 
Posts: n/a
Default Sum cells in excel if shaded

http://www.cpearson.com/excel/colors.htm

--
Kind regards,

Niek Otten

"David" wrote in message
...
How do I conditionally sum a set of cells if I have them highlighted?



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
David Billigmeier
 
Posts: n/a
Default Sum cells in excel if shaded

You will need a UDF, the following will sum every cell if it has ANY color
shading (will ignore only the cells with no shading). Then, to implement,
use the following in any cell on your spreadsheet =SumHighlighted(A1:D100)...
change reference to fit your data.

Function SumHighlighted(rng As Range)
For Each rng In rng
If Not (rng.Interior.ColorIndex = xlNone) Then
Sum = Sum + rng
End If
Next
SumHighlighted = Sum
End Function
--
Regards,
Dave


"David" wrote:

How do I conditionally sum a set of cells if I have them highlighted?

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
TRYING TO SET UP EXCEL SPREADSHEET ON MY COMPUTER MEGTOM New Users to Excel 5 October 27th 05 03:06 AM
Merging cells in Excel 2003 Bob Excel Discussion (Misc queries) 1 October 19th 05 07:10 PM
EXCEL, VSTO: Fastest way to access multiple cells Alan Excel Discussion (Misc queries) 1 June 1st 05 02:45 PM
How do I merge cells in Excel, like just 2 cells to make one big . chattacat Excel Discussion (Misc queries) 2 January 19th 05 04:25 PM
How do I password protect cells in a spreadsheet created in Excel [email protected] Excel Worksheet Functions 0 November 22nd 04 09:21 PM


All times are GMT +1. The time now is 03:04 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"