Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
KW KW is offline
external usenet poster
 
Posts: 10
Default How to determine color of a cell?

I have a column of numbers that if the cell is a color and another cell is
"Y" then sum the color cells.
Below is my example and below that is an equation I tried, but it did not
work because the ColorIndex(), appears to not traverse through the Array it
only returned the first cell color.
I am a rookie at this, so please excuse the poor example.

Question: Is there a way to get the "Color Index" for each cell in a row and
add the row as I go?
Thanks in advance for any help.

Example:
Row 1: Column A is Y for space charge, Column C is $10 is highlighted RED
Row 2: Column A is Y for space charge, Column C is $20 is not highlighted
Row 3: Column A is N for space charge, Column C is $40 is highlighted RED
Row 4: Column A is N for space charge, Column C is $10 is not highlighted

= SUMIF(and(a1:a4="N",C1:C4=indexcolor(44)),c1:c4,0)

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,939
Default How to determine color of a cell?

Check out this link...

http://www.xldynamic.com/source/xld.ColourCounter.html
--
HTH...

Jim Thomlinson


"KW" wrote:

I have a column of numbers that if the cell is a color and another cell is
"Y" then sum the color cells.
Below is my example and below that is an equation I tried, but it did not
work because the ColorIndex(), appears to not traverse through the Array it
only returned the first cell color.
I am a rookie at this, so please excuse the poor example.

Question: Is there a way to get the "Color Index" for each cell in a row and
add the row as I go?
Thanks in advance for any help.

Example:
Row 1: Column A is Y for space charge, Column C is $10 is highlighted RED
Row 2: Column A is Y for space charge, Column C is $20 is not highlighted
Row 3: Column A is N for space charge, Column C is $40 is highlighted RED
Row 4: Column A is N for space charge, Column C is $10 is not highlighted

= SUMIF(and(a1:a4="N",C1:C4=indexcolor(44)),c1:c4,0)

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
KW KW is offline
external usenet poster
 
Posts: 10
Default How to determine color of a cell?

Jim,

Thanks for the information, took me a bit to figure out how to use the
information, but once I did it hit the spot. THANKS

"Jim Thomlinson" wrote:

Check out this link...

http://www.xldynamic.com/source/xld.ColourCounter.html
--
HTH...

Jim Thomlinson


"KW" wrote:

I have a column of numbers that if the cell is a color and another cell is
"Y" then sum the color cells.
Below is my example and below that is an equation I tried, but it did not
work because the ColorIndex(), appears to not traverse through the Array it
only returned the first cell color.
I am a rookie at this, so please excuse the poor example.

Question: Is there a way to get the "Color Index" for each cell in a row and
add the row as I go?
Thanks in advance for any help.

Example:
Row 1: Column A is Y for space charge, Column C is $10 is highlighted RED
Row 2: Column A is Y for space charge, Column C is $20 is not highlighted
Row 3: Column A is N for space charge, Column C is $40 is highlighted RED
Row 4: Column A is N for space charge, Column C is $10 is not highlighted

= SUMIF(and(a1:a4="N",C1:C4=indexcolor(44)),c1:c4,0)

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
insert date Larry Excel Worksheet Functions 28 July 15th 06 02:41 AM
Compiling macro based on cell values simonsmith Excel Discussion (Misc queries) 1 May 16th 06 08:31 PM
Custom functions calculating time arguments Help Desperate Bill_De Excel Worksheet Functions 12 April 25th 06 02:22 AM
cell color index comparison MINAL ZUNKE New Users to Excel 1 June 30th 05 07:11 AM
Function to determine if any cell in a range is contained in a given cell [email protected] Excel Worksheet Functions 3 February 7th 05 04:19 PM


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