Conditional Formatting - for a range dependent on other column

Joe Carter

New Member
Joined
Nov 26, 2019
Messages
15
Office Version
  1. 365
Platform
  1. Windows
This is probably a basic question, sorry if elementary.

When the "units" column in my spreadsheet is "HP" for horse power, I want the "LOAD" column next to it to change to fraction format, because motors typically showup as "1/2 HP" and not "0.5 HP".

I got it to work and could do a conditional format rule per cell, but there's got to be a way for excel to look to the right of the formatted cell, see if the value is equal to "HP", then apply the 38718 (means fraction) format.
LOADUNITS - HP KW MCA
1/33HP
0.25KW
3.00MCA
0.25HP

First row works with Rule Formula: =$E$5="HP", Format is 38718 for fraction, Applies to: =$D$5.
Last row is example of the problem, it's HP so should show 1/4.
How do I apply it to the a range for say D5 to E120? I tried highlighting all and doing conditional formating, but it keeps looking at $E$5.
 

Some videos you may like

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,231
Office Version
  1. 365
Platform
  1. Windows
Select all the data in Col D & use =$E5="HP"
 

Joe Carter

New Member
Joined
Nov 26, 2019
Messages
15
Office Version
  1. 365
Platform
  1. Windows
Thanks again Fluff - it works like a charm. I could've sworn I tried that!
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,231
Office Version
  1. 365
Platform
  1. Windows
You're welcome & thanks for the feedback.
 

Watch MrExcel Video

Forum statistics

Threads
1,126,952
Messages
5,621,794
Members
415,856
Latest member
jimb2k

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
Top