Conditional formatting (extended? or vba code?) for entire row

David77

Board Regular
Joined
Jun 24, 2020
Messages
109
Office Version
  1. 365
Platform
  1. Windows
Hello everybody,

I am currently managing a worksheet containing a stock overview, which looks like this:

1596531116075.png


I have made two conditional formatting rules which assert under my "Antal" (meaning Quantity) column that if the number is below or equal to 0 the color should be red and if the color is above 0 it should be a neon green.

However, I would like to extend this to make it even more obvious when something is above 0 by highlighting the entire row, so it would look like this essentially:

1596531363865.png


Is there any way in which I can do this through some sort of coding or conditional formatting perhaps? So whenever a quantity is above 0, the entire row gets highlighted in my neon green color.

If anybody can help me with this issue I would greatly appreaciate it! Thank you so much :)

Best regards,
David
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
is your data in columns A-E, with headers in row 1 ?
 
Upvote 0
Good morning David
IF you go to conditional formatting, and new rule
then select use a formula to determine which cells to format:

Under the heading "Format values where this formula is true", type the following formula:

=if($e41>0,1,0)

Then click on the "Format" button and choose your colour.

then go to the conditional formatting rules manager and change "Applies to" to "$a$41:$e$136
 
Upvote 0
David

Instead of using 'cell contains' rules use 'Use a formula to determine which cells to format.

1 Select the entire range to be formatted, e.g. A41:E136.

2 Goto Conditional Formatting>Clear Rules>Clear Rules from Selected Cells

3 Goto Conditional Formatting>Manage Rules...

4 Goto New Rule...

5 Select Use a formula...

6 Enter this formula.

=$E41<>""

7 Apply the green formatting.

8 Repeat steps 4-7, changing the formula to $E41="" and applying the red formatting.
 
Upvote 0
Hel
David

Instead of using 'cell contains' rules use 'Use a formula to determine which cells to format.

1 Select the entire range to be formatted, e.g. A41:E136.

2 Goto Conditional Formatting>Clear Rules>Clear Rules from Selected Cells

3 Goto Conditional Formatting>Manage Rules...

4 Goto New Rule...

5 Select Use a formula...

6 Enter this formula.

=$E41<>""

7 Apply the green formatting.

8 Repeat steps 4-7, changing the formula to $E41="" and applying the red formatting.

Hello again Norie,

Once again, you have saved my day - it worked! Thank you so very much :) :)

Have a wonderful day!

Best regards,
David
 
Upvote 0

Forum statistics

Threads
1,214,951
Messages
6,122,446
Members
449,083
Latest member
Ava19

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