Forum Discussion
Excel formula to auto format cell based on value and phrase in second cell
- Jun 02, 2025
Select Cell 1.
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=AND(Cell1>=1, Cell1<=30, Cell2="Days NET")
You have to replace Cell1 and Cell2 with the correct cell references of course.
Click Format...
Activate the Fill tab.
Select green as fill color.
Click OK, then click OK again.
Select Cell 1.
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
=AND(Cell1>=1, Cell1<=30, Cell2="Days NET")
You have to replace Cell1 and Cell2 with the correct cell references of course.
Click Format...
Activate the Fill tab.
Select green as fill color.
Click OK, then click OK again.