Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
nt nt is offline
external usenet poster
 
Posts: 10
Default sum total of numbers that are a certain color?

I have a spreadsheet with numbers in every column and row with different
color fonts. I need to add up the numbers that are red, blue, green, etc.
For example:
A1 - 1.3 (red)
B2 - 1.5 (blue)
A5 - 1.0 (red)
D3 - 1.7 (blue)

I want cell A7 to add the red 1.3 + 1.0 and show me a total of 2.3 for red.
Then again in cell A8 to add the blue 1.5 + 1.7 and show a total of 3.2 for
blue.

I already have a colorfunction for counting the highlighted cell of a
certain color =ColorFunction($M$76,C7:AG73,FALSE) and this was working.
Until I tried adding another ColorFunction in a new vb module to SUM but the
cell that I've typed the formula in =ColorFunction($H$73,C7:AG73,TRUE) first
comes up with a Microsoft Visual Basic box: Ambiguous name detected:
ColorFunction and the cell has an error showing #NAME?. I'm not real smart
on formulas so I'm trying to learn, but the posts out there relating to this
question have confused me. I appreciate your time and patience. Thank you.
NT
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default sum total of numbers that are a certain color?

You are almost there. Just rename your new function to make it different
from the original.
--
Gary''s Student - gsnu200907


"NT" wrote:

I have a spreadsheet with numbers in every column and row with different
color fonts. I need to add up the numbers that are red, blue, green, etc.
For example:
A1 - 1.3 (red)
B2 - 1.5 (blue)
A5 - 1.0 (red)
D3 - 1.7 (blue)

I want cell A7 to add the red 1.3 + 1.0 and show me a total of 2.3 for red.
Then again in cell A8 to add the blue 1.5 + 1.7 and show a total of 3.2 for
blue.

I already have a colorfunction for counting the highlighted cell of a
certain color =ColorFunction($M$76,C7:AG73,FALSE) and this was working.
Until I tried adding another ColorFunction in a new vb module to SUM but the
cell that I've typed the formula in =ColorFunction($H$73,C7:AG73,TRUE) first
comes up with a Microsoft Visual Basic box: Ambiguous name detected:
ColorFunction and the cell has an error showing #NAME?. I'm not real smart
on formulas so I'm trying to learn, but the posts out there relating to this
question have confused me. I appreciate your time and patience. Thank you.
NT

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
nt nt is offline
external usenet poster
 
Posts: 10
Default sum total of numbers that are a certain color?

Do you mean type in something like ColorSum instead of ColorFunction in the
VB module??

"Gary''s Student" wrote:

You are almost there. Just rename your new function to make it different
from the original.
--
Gary''s Student - gsnu200907


"NT" wrote:

I have a spreadsheet with numbers in every column and row with different
color fonts. I need to add up the numbers that are red, blue, green, etc.
For example:
A1 - 1.3 (red)
B2 - 1.5 (blue)
A5 - 1.0 (red)
D3 - 1.7 (blue)

I want cell A7 to add the red 1.3 + 1.0 and show me a total of 2.3 for red.
Then again in cell A8 to add the blue 1.5 + 1.7 and show a total of 3.2 for
blue.

I already have a colorfunction for counting the highlighted cell of a
certain color =ColorFunction($M$76,C7:AG73,FALSE) and this was working.
Until I tried adding another ColorFunction in a new vb module to SUM but the
cell that I've typed the formula in =ColorFunction($H$73,C7:AG73,TRUE) first
comes up with a Microsoft Visual Basic box: Ambiguous name detected:
ColorFunction and the cell has an error showing #NAME?. I'm not real smart
on formulas so I'm trying to learn, but the posts out there relating to this
question have confused me. I appreciate your time and patience. Thank you.
NT

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
nt nt is offline
external usenet poster
 
Posts: 10
Default sum total of numbers that are a certain color?

Worked! Thank you for your help!
NT

"NT" wrote:

Do you mean type in something like ColorSum instead of ColorFunction in the
VB module??

"Gary''s Student" wrote:

You are almost there. Just rename your new function to make it different
from the original.
--
Gary''s Student - gsnu200907


"NT" wrote:

I have a spreadsheet with numbers in every column and row with different
color fonts. I need to add up the numbers that are red, blue, green, etc.
For example:
A1 - 1.3 (red)
B2 - 1.5 (blue)
A5 - 1.0 (red)
D3 - 1.7 (blue)

I want cell A7 to add the red 1.3 + 1.0 and show me a total of 2.3 for red.
Then again in cell A8 to add the blue 1.5 + 1.7 and show a total of 3.2 for
blue.

I already have a colorfunction for counting the highlighted cell of a
certain color =ColorFunction($M$76,C7:AG73,FALSE) and this was working.
Until I tried adding another ColorFunction in a new vb module to SUM but the
cell that I've typed the formula in =ColorFunction($H$73,C7:AG73,TRUE) first
comes up with a Microsoft Visual Basic box: Ambiguous name detected:
ColorFunction and the cell has an error showing #NAME?. I'm not real smart
on formulas so I'm trying to learn, but the posts out there relating to this
question have confused me. I appreciate your time and patience. Thank you.
NT

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
Changing a cell color to reflect positive or negative total Alex Vega[_2_] New Users to Excel 4 May 27th 07 03:25 PM
how can you highlight or color your total line in a Pivot table R HeidiL Excel Worksheet Functions 1 March 9th 07 12:08 AM
Sort or sub-total by Fill color or font color Excel_seek_help Excel Discussion (Misc queries) 1 April 27th 06 09:01 PM
Can I total only numbers with a specific font color? BLillie11 Excel Discussion (Misc queries) 1 December 20th 05 04:34 AM
I have cells with diffent color fonts and need to total based on . KyaraB Excel Discussion (Misc queries) 1 April 20th 05 05:28 PM


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

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"