STREAMLINED CODE TO HIGHLIGHT OR UNHIGHLIGHT A RANGE

Eddie G.

Board Regular
Joined
Feb 27, 2002
Messages
98
I currently used some clunky code that was written some years ago and I know there is a more streamlined way to do it....... i have a worksheet where is number greater than 1 is placed in a cell in a range, lets say, b2:b25 ,which causes the activecell (b2) and seven cells to the right to unhighlight. I need simpler code that will do this, as well as highlight the seven cells to the right if the number in B2 is deleted (blank cell)
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Can you just use conditional formating to make the cells look the way you want based on the formula you choose? For example you could conditionally format cells c1:c10 to be highlighted if the formula =isblank(b2)='Y' is true.
 
Upvote 0
HELLO

I AGREE

USE CONDITIONAL FORMATTING, IT IS NICE, AND NO VBA CODE NEEDED.

RGDS

ANDREAS
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,751
Members
448,989
Latest member
mariah3

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