Conditional Formatting based on data in another spreadsheet

michael.collins22

New Member
Joined
May 7, 2008
Messages
31
I have a column of names. I am trying to conditionally format the names (Green or Red) based on data from another spreadsheet in the workbook. Is this possible?
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Yes, but you'd have to first assign a named range.

For example, you can't use ='Other Sheet'!A1>5 as a criterion for your conditional format, but you could set (via insert --> name --> define) the named range my_cell to refer to ='Other Sheet'!A1 and use =my_cell > 5 as your criterion.
 
Upvote 0
OK, the more I know, the more questions I have.

What I am trying to do is turn the background color of a cell one color or another based on if a text string is in a column of data in another spreadsheet in the same workbook.

You showed me how to Define a cell and use that one cell as criteria in my conditional formatting. What about trying to Define a group of cells and including that Definition into a more complicated formula than a simple logic one? Is that possible in Conditional Formatting?

Sorry to make things more difficult...
 
Upvote 0
Set the named range my_range to refer to =Sheet2!$A$1:$A$100 or whatever your range is.

Then, define your conditional formatting for Sheet1!A1 as: Formula is =ISNUMBER(MATCH(A1,my_range,0)) and apply the desired formatting.
 
Upvote 0
Thanks so much for your help. It appears to be working. I'll post back if I run into anymore complications. How come you used the Function ISNUMBER and not ISTEXT?
 
Upvote 0
MATCH(A1,my_range,0) will either return a number (the position of the match) or an #N/A error (if no match is found). So, ISNUMBER appropriately maps those possibilities to TRUE/FALSE values for use as the basis for the conditional formatting criterion.
 
Upvote 0
Thanks for explaining. I am trying to get to the point where I am (more or less) self-sufficient so I'm trying to understand why the formulas work.
 
Upvote 0

Forum statistics

Threads
1,214,375
Messages
6,119,168
Members
448,870
Latest member
max_pedreira

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