Identify a background colour and put x in cell

Lensmeister

New Member
Joined
Mar 27, 2006
Messages
45
Hi,

Hope this not a strange one to try and explain.

I have a very large spreadsheet with over 5000 lines of data. Some have a red background in the. between columns W and AL. in cell AT2 I want a formula that basically puts an X if the criteria is met.

i.e.

If any of the cells between W2:AL2 had a RED background then put a X in cell AT2.

Can anyone help please.

thanks :)
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Try this User Defined Function which goes in a standard module

Code:
Function IsRed(r As Range) As String
Application.Volatile
Dim c As Range
For Each c In r
    If c.Interior.Color = vbRed Then
        IsRed = "X"
        Exit For
    End If
Next c
End Function

To use as a worksheet formula

=isred(W2:AL2)

If you change the colouring you will need to press F9 to recalculate.
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,285
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top