Highlight Negative number cells

xdave

New Member
Joined
Jun 21, 2011
Messages
4
Hi,

im new to Macros,vba, and excel in general.
i have done some research and managed to get a few useful macros working. now im stuck finding a macro that will highlight negative cells in say column "L", and also highlight cells in column "V" with a value of less than 1.
Thanks in advance for any help you might be able to offer.

Dave.
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Have a go at doing it with Conditional Formatting (and record it via the macro recorder if you need a macro).
 
Upvote 0
The Conditional formatting worked for my first column where i need it to fill cells less than 0, but for my 2nd column where i need it to fill cells less than 1 i get a problem, it also fills blank cells continually through the whole column :(
 
Upvote 0
The Conditional formatting worked for my first column where i need it to fill cells less than 0, but for my 2nd column where i need it to fill cells less than 1 i get a problem, it also fills blank cells continually through the whole column :(
What version of Excel are you using?
 
Upvote 0
2007, it seems to be recongnising a blank cell as a number between 1 and 0, because just doing below zero i dont have the problem.
 
Upvote 0
2007, it seems to be recongnising a blank cell as a number between 1 and 0, because just doing below zero i dont have the problem.
An empty cell will evaluate as 0 so you have to tell it to ignore the empty cells.

Try this...

Let's assume the range to format is V2:V10.

Select the *entire* range V2:V10 starting from cell V2.
Cell V2 will be the active cell. The active cell is the
one cell in the selected range that is not shaded. The
formula will be relative to the active cell.
  • Goto the Home tab>Styles>Conditional Formatting>Manage rules>New rule>Use a formula to determine which cells to format
  • Enter this formula in the box below:
    =AND(V2<>"",V2<1)
  • Click the Format button
  • Select the desired style(s)
  • OK out
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,750
Members
452,940
Latest member
rootytrip

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