ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Can you do an IF function whether a cell has a fill color of Rose (https://www.excelbanter.com/excel-worksheet-functions/62016-can-you-do-if-function-whether-cell-has-fill-color-rose.html)

Kays Excel Question

Can you do an IF function whether a cell has a fill color of Rose
 
I want to get a 1 returned when I quere a cell if the fill color is Rose
(colorindex=38). Do you use the IF function or is there another way to do
it? What is the IF function syntax?

Bob Phillips

Can you do an IF function whether a cell has a fill color of Rose
 
See http://www.xldynamic.com/source/xld.ColourCounter.html

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Kays Excel Question" <Kays Excel wrote
in message ...
I want to get a 1 returned when I quere a cell if the fill color is Rose
(colorindex=38). Do you use the IF function or is there another way to do
it? What is the IF function syntax?




Otto Moehrbach

Can you do an IF function whether a cell has a fill color of Rose
 
Yes, you would use an IF function but one in VBA. And the result can be
anything you want in any cell you want. But if you could provide a bit more
information about what you have and what you want to have, perhaps there are
other, better, ways to get what you want. For instance, where did the Rose
color come from, or how did it get there? HTH Otto
"Kays Excel Question" <Kays Excel wrote
in message ...
I want to get a 1 returned when I quere a cell if the fill color is Rose
(colorindex=38). Do you use the IF function or is there another way to do
it? What is the IF function syntax?




Gary''s Student

Can you do an IF function whether a cell has a fill color of Rose
 
Enter this small UDF:

Function clr(R As Range) As Integer
With R.Interior
clr = .ColorIndex
End With
End Function

and use in the worksheet like =clr(A1)
--
Gary''s Student


"Kays Excel Question" wrote:

I want to get a 1 returned when I quere a cell if the fill color is Rose
(colorindex=38). Do you use the IF function or is there another way to do
it? What is the IF function syntax?



All times are GMT +1. The time now is 05:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com