Forum Discussion
conditional formatting based on content of another cell
- Apr 13, 2021
Select the cells that you want to format conditionally. If more than one, the top left cell should be the active cell in the selection. Note the address of this cell.
On the Home tab of the ribbon. select Conditional Formatting > New Rule...
Select 'Use a formula to determine which cells to format'.
Enter a formula that evaluates to TRUE (or a non-zero number) if the rule should be applied, and to FALSE (or 0) otherwise.
In your example, let's say A2 is the active cell in the selection.
Use the following formula:
=B2<>""
Click Format...
Activate the Fill tab.
Specify the desired color (green in your example).
Click OK, then click OK again.
Select B1:E1 on the 1. Interview Questions tab (or further to the right).
B1 should be the active cell in the selection.
On the Home tab of the ribbon, click Conditional Formatting > New Rule...
Select 'Use a formula to determine which cells to format'.
Enter the formula
=XLOOKUP(B2, Summary!$A:$A, Summary!$L:$L, "")<>""
Click Format...
Activate the Fill tab.
Select a fill color.
Click OK, then click OK again.
HansVogelaar thank you so much for the formula, I appreciate it. Unfortunately, I still did something that was not correct. It marked all names green, suggestions?
- SergeiBaklanAug 28, 2024Diamond Contributor
jbender705 , glad to know it helped
- jbender705Aug 28, 2024Copper ContributorThak you so much for all your help, it worked. That is so great, now I can finish the excel and lock it. Thank you so much, again.
- jbender705Aug 28, 2024Copper Contributoryes, that was the plan, thank you so very much for your help, the both of you.
That is so great, now I can finish it. - HansVogelaarAug 27, 2024MVP
Because the text values begin in C1 and the corresponding values are in column B on the Summary sheet, the formula should be =XLOOKUP(C1, Summary!$B:$B, Summary!$L:$L, "")<>""
See the attached version.
- SergeiBaklanAug 27, 2024Diamond Contributor
- jbender705Aug 27, 2024Copper Contributor
Dear Both, it does not want to work, I am unsure why. I am sure I am doing something wrong somewhere. I attached the file here if you can figure it out that would be great.
- SergeiBaklanAug 23, 2024Diamond Contributor
- HansVogelaarAug 23, 2024MVP
That link requires logging in.
- jbender705Aug 23, 2024Copper Contributor
yes, of course.
https://pcugroup-my.sharepoint.com/:x:/r/personal/jbender_pcugroup_com/Documents/Hiring%20Tamplate_Certification_Planner.xlsx?d=wdbe1903a1dfb4ecb8e1b11050b6e0a06&csf=1&web=1&e=JSLDER
- HansVogelaarAug 23, 2024MVP
Could you attach a small sample workbook demonstrating the problem (without sensitive data), or if that is not possible, make it available through OneDrive, Google Drive, Dropbox or similar?