Re: How to test an adjacent cell for blank in conditional formatting
- From: Dave Peterson <petersod@xxxxxxxxxxxxxxxx>
- Date: Wed, 28 Mar 2007 09:51:53 -0500
Just use the adjacent cell's address in the formula:
If A1 is the activecell:
formula is:
=B1<>""
or
=B1=""
depending on what you want.
Or add it to an existing rule:
=and(B1<>"",yourformulahere)
davegb wrote:
On Mar 28, 6:08 am, Dave Peterson <peter...@xxxxxxxxxxxxxxxx> wrote:
In code?
dim myCell as range
set mycell = active***.range("b99")
if isempty(mycell.offset(0,1).value) then
msgbox "the cell to the right is empty--no formula, no nothing!"
end if
If you want to check to see if it contains a formula that evaluates to "" or is
empty:
if mycell.offset(0,1).value = "" then
davegb wrote:
I want to test to see if an adjacent cell is blank or not to change
the formatting of the cell in question. I would guess it might involve
the Offset property. Does anyone know how to do this?
Thanks!
--
Dave Peterson
Thanks for your reply, Dave. I know how to do it in code, I want to
know how to do it in conditional formatting.
--
Dave Peterson
.
- Follow-Ups:
- References:
- Prev by Date: Re: Show Excel in two separate instances/two monitors?
- Next by Date: Re: How do I display a text message when a cell has a certain value??
- Previous by thread: Re: How to test an adjacent cell for blank in conditional formatting
- Next by thread: Re: How to test an adjacent cell for blank in conditional formatting
- Index(es):