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
 

Some videos you may like

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Yongle

Well-known Member
Joined
Mar 11, 2015
Messages
6,977
Office Version
  1. 365
Platform
  1. Windows
is your data in columns A-E, with headers in row 1 ?
 

jon1315

New Member
Joined
Jun 16, 2020
Messages
45
Office Version
  1. 365
Platform
  1. Windows
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
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,219
Office Version
  1. 365
Platform
  1. Windows
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.
 

David77

Board Regular
Joined
Jun 24, 2020
Messages
109
Office Version
  1. 365
Platform
  1. Windows
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
 

Watch MrExcel Video

Forum statistics

Threads
1,122,979
Messages
5,599,156
Members
414,294
Latest member
shariflotfi

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