Format a cell based on value of another cell

jrisebo

Active Member
Joined
Mar 15, 2011
Messages
322
Office Version
  1. 365
Platform
  1. Windows
Lets say A1-A100 have values (but not every cell) how do a write a formula so that corresponding cell in B1-B100 is filled in with a color?

For example, it A20 value is 14, I want B20 to be yellow, and so on.

I need a formula so I can then copy it to like 40 columns I am trying to make this work on.

Thanks
 
Last edited:

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
You will need conditional formatting or a macro for this. An in cell formula cannot alter the format.
In Cf you could use this formula
=$A1=14
 
Upvote 0
You will need conditional formatting or a macro for this. An in cell formula cannot alter the format.
In Cf you could use this formula
=$A1=14

Ok, thanks. My values change so I cant do an exact formula. I didnt know if there was a formula that works like "If that cell has text, then make this cell yellow" but then be able to be drug down a column so the row changes.
 
Upvote 0
What range do you want this to work on?
 
Upvote 0
I want it to look in cells A1-A100, and then in B1-B100 color those cells yellow based on the cells in A1 having a value. It can be random, and they can change whether or not they have a value. I forgot to mention, B1-B100 already have a formula in them. This is check.
 
Upvote 0
In that case select B1:B100, on the Home tab select Conditional Format > New rule > Use a formula > =$A1<>"" select format > Ok
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,254
Members
452,624
Latest member
gregg777

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