ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Create a formula using cell format (https://www.excelbanter.com/excel-discussion-misc-queries/87862-create-formula-using-cell-format.html)

CMagras

Create a formula using cell format
 
I am trying to create a formula that would place an X in Cell J1 if Cell I1
is green. Can someone help?

Don Guillett

Create a formula using cell format
 
how did it get to be green?
macro or cf

--
Don Guillett
SalesAid Software

"CMagras" wrote in message
...
I am trying to create a formula that would place an X in Cell J1 if Cell I1
is green. Can someone help?




Gary''s Student

Create a formula using cell format
 
First enter this UDF:

Function IsGreen(r As Range) As Boolean
IsGreen = False
If r.Count 1 Then Exit Function
If r.Interior.ColorIndex = 4 Then
IsGreen = True
End If
End Function

The function will return true if the argument has a background color of
green (#4).

Then in J1 enter:

=IF(IsGreen(I1),"X","")

This method will not work of conditional formatting.
--
Gary's Student


"CMagras" wrote:

I am trying to create a formula that would place an X in Cell J1 if Cell I1
is green. Can someone help?



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

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