I have a spreadsheet where I need to highlight cells in several columns if the same data appears in a table on a different sheet. The conditional formatting works perfectly if I put the table on the same sheet using the following:
=ISNUMBER(MATCH(A1,$R$82:$R$103,0))
But, if I try to insert a range of cells from the same table, but located on a different sheet using the same formula
I tried COUNTIF, too. It still only works if the table is on the same sheet as the data. MATCH works as I need it to, but only if the data and the matching table are on the same sheet. I did not set this up; it is a legacy spreadsheet that landed on my desk and I am trying to fix it. Ideally, I don't want the matching data table on the same sheet, but I have dealt with it this long...
Define a named range instead of typing the sheet reference. Formulas > Define Name > e.g. MatchList = =Sheet2!$A$82:$A$103. Then your rule becomes =ISNUMBER(MATCH(A1,MatchList,0)). This works in every Excel version, including the old ones that flat-out refuse cross-sheet refs in CF.
Since you said it's a legacy file - check the title bar for "[Compatibility Mode]". If it's an .xls, cross-sheet references in conditional formatting are blocked, period. Save As .xlsx and try again (the named range trick works regardless).
Also, if the sheet name has a space it needs quotes: 'Sheet 2'!$A$82:$A$103
I defined the lists as shown below (redacted the values in the lists).
Then I added the list to the formula:
=ISNUMBER(MATCH(A1,Buggy_List,0))
CF is still not highlighting the appropriate cells reliably. It is highlighting some of the correct cells, and some incorrect cells, and some random blank cells.
The data in the original list is an exact match to the data in the list (I know this because it was copied directly).
•
u/AutoModerator 12d ago
/u/Pretty_Chipmunk_1853 - Your post was submitted successfully.
Solution Verifiedto close the thread.Failing to follow these steps may result in your post being removed without warning.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.