can conditional formating be based on the named range?

tonywatsonhelp

Well-known Member
Joined
Feb 24, 2014
Messages
3,210
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Hi everyone,

I have a sheet and every cell in range "AA5:AZ500" has its own named range.
then in column E I have a list of some of these named ranges.

is there a formula I could put into conditional formating that would basically say if any cell in range "AA5:AZ500" named range is listed in column E then true?

thanks
Tony
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Just to be clear you have a block of cells AA5:AZ500 (11,700 cells) with each cell being its own named range? So you have 11,700 named ranges with a size of 1 cell each?

You could try something like this User Defined Function:
VBA Code:
Function IsTextInNames(LookupRangeName As Variant)
Dim n As Variant
Dim a As Boolean
Dim c As Integer
Dim i As Integer
c = Application.Names.Count
For i = 1 To c
        If i = 1 Then a = False
        n = Application.Names(i).Name
            If n = LookupRangeName Then
                a = True
            End If
    Next i
IsTextInNames = a
End Function





Book1
ABCDEFGHI
1
2List of Range Names:
3EUNKN
4HDIYYTRUETCQFX
5TCQFXTRUEQFIAQ
6FALSEHDIYY
7FALSE
8
9
Sheet1
Cell Formulas
RangeFormula
B4:B7B4=IsTextInNames(A4)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A4:A7Expression=IsTextInNames(A4)textNO
 
Last edited:
Upvote 0
Solution
Thank you awoohaw, yes, as crazy as that sounds its exactly what I have,
and this is a great solution thank you
 
Upvote 0
My pleasure. Happy to help.

Best Wishes!
 
Upvote 0

Forum statistics

Threads
1,223,952
Messages
6,175,596
Members
452,657
Latest member
giadungthienduyen

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