Worksheet Change event

  • Thread starter Thread starter Todd Huttenstine
  • Start date Start date
T

Todd Huttenstine

Hey guys

In column L, the cell value will either be blank, "Yes",
or "No". What I would like is if the cell value is "Yes",
then I need that cell plus the next 10 cells to the left
to have the following format: Black background

I need to have this in the worksheet change event. How
would I do this?


Todd
 
Hi Todd
why don't you use conditional formating for this?
try the following
- select the cells B1:L20 (or how many rows you want)
- goto 'format - Conditional Format' and enter the formula
=$L1="Yes"
- choose your format
 
I was going to do that at first, but each row depends on
the value of the cell in column L so I would have to
select hundreds of rows and setup conditional formatting
in each. I wish I could drag like I can with a normal
excel formula, but conditional formatting does not allow
this. Because of this I figured a code would be best and
less timely.
 
Hi
nor problem with that:
just select all rows tigether and enter the formula I provided to you.
Note the mix of absolute and relative reference:
=$L1="Yes"

only change the '1' to the first row of your selection. and of course
you can copy this format for further rows
 
You can certainly copy conditional formatting (paste special/formats).
Make sure your cell references are relative (i.e., no "$") for the
references you want XL to change automatically).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top