ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   in excel, can I use values based on color for an "if, then" condi (https://www.excelbanter.com/excel-worksheet-functions/156674-excel-can-i-use-values-based-color-if-then-condi.html)

Carlos

in excel, can I use values based on color for an "if, then" condi
 
in excel, can I use values based on color for an "if, then" condition? if the
name is in red font, then multiply B3 by D3.

Bob Phillips

in excel, can I use values based on color for an "if, then" condi
 
You need a UDF, for example

Function CI(rng as Range)
If rng.Count = 1 Then
CI = rng.Font.Colorindex
End If
End Sub

and use like this

=IF(CI(B3)=3,B3*D3,"")

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"carlos" wrote in message
...
in excel, can I use values based on color for an "if, then" condition? if
the
name is in red font, then multiply B3 by D3.





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

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