=Cell("color",[reference])

A

Allzero

Any ideas why this function is not working for me? I am trying to identify
cells with red color cell content (financial negatives) . Other 'info_types'
are working OK for all colors I get a zero Thanks
 
D

David McRitchie

and what do you have for the custom number formatting and value
of the cell being examined.

It works for me: the first appears in red font because of it's custom number format
formula in Col B Format used in Col A
(3.00) 1 =CELL("color",A23) 0.00_);[Red](0.00)
-3 0 =CELL("color",A24) General
1 0 =CELL("color",A25) General
 
A

Allzero

Thanks David
I had not formatted my cells as you suggested. Now that I do, the F(n)
gives me all ones even for black figures.

David McRitchie said:
and what do you have for the custom number formatting and value
of the cell being examined.

It works for me: the first appears in red font because of it's custom number format
formula in Col B Format used in Col A
(3.00) 1 =CELL("color",A23) 0.00_);[Red](0.00)
-3 0 =CELL("color",A24) General
1 0 =CELL("color",A25) General



---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

Allzero said:
Any ideas why this function is not working for me? I am trying to identify
cells with red color cell content (financial negatives) . Other 'info_types'
are working OK for all colors I get a zero Thanks
 
D

David McRitchie

Ok i see, we are reading the HELP wrong, it is not testing
whether Color is showing only if negative values would be displayed
in color. and black is a color

these formats will show 1 since there is a color for negative values
0.00_);[Red](0.00)
0.00_);[Black](0.00)
0.00_);[Blue](0.00)
these formats will show 0 since there is only automatic color for negative values
0.00_);(0.00)
General
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

Allzero said:
Thanks David
I had not formatted my cells as you suggested. Now that I do, the F(n)
gives me all ones even for black figures.

David McRitchie said:
and what do you have for the custom number formatting and value
of the cell being examined.

It works for me: the first appears in red font because of it's custom number format
formula in Col B Format used in Col A
(3.00) 1 =CELL("color",A23) 0.00_);[Red](0.00)
-3 0 =CELL("color",A24) General
1 0 =CELL("color",A25) General



---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

Allzero said:
Any ideas why this function is not working for me? I am trying to identify
cells with red color cell content (financial negatives) . Other 'info_types'
are working OK for all colors I get a zero Thanks
 
S

Sulivian

I have a list of emails, some are colored, and i want to use the cell(color)
function (and the if funtion) to place some text next to the colored cells.

but i can't seem to get the cell(color) function to work. its not showing a
'1' when i do the following:

=cell("color",b4) , and b4 is : " [email protected] " with blue text color

and i dont understand how it works (david explained but i'm not that
computer smart ! )

please help

thanx
 
B

Bob Phillips

All that CELL function does is return 1 if the NEGATIVE value format of a
cell is in colour else 0. Not much sue to you at all.

Add this UDF and use in your worksheet like so

Function IsColour(rng As Range, colour As Long)
IsColour = rng.Font.ColorIndex = colour
End Function


=IsColour(B4,5)

5 is blue. so this will return TRUE or FALSE

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

Sulivian said:
I have a list of emails, some are colored, and i want to use the cell(color)
function (and the if funtion) to place some text next to the colored cells.

but i can't seem to get the cell(color) function to work. its not showing a
'1' when i do the following:

=cell("color",b4) , and b4 is : " [email protected] " with blue text color

and i dont understand how it works (david explained but i'm not that
computer smart ! )

please help

thanx



David McRitchie said:
Ok i see, we are reading the HELP wrong, it is not testing
whether Color is showing only if negative values would be displayed
in color. and black is a color

these formats will show 1 since there is a color for negative values
0.00_);[Red](0.00)
0.00_);[Black](0.00)
0.00_);[Blue](0.00)
these formats will show 0 since there is only automatic color for negative values
0.00_);(0.00)
General
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm
 
Top