Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

quick syntax help for empty cells 1

Status
Not open for further replies.

Luis939

MIS
Feb 28, 2003
453
US
Really quickly, is there a way to say in code
IF my activecell has no value (either nothing at all "", or one empty space " " or more empty spaces " "
basically i dont want to encounter a cell that doesnt have a visible value in it

I tried if activecell.value = empty, but that doesnt account for more than one empty character, i want something to account for all possible blank characters or blank strings of any length, thanks!!!
 
how about
if trim(activecell.text) = "" then.....

Rgds, Geoff
[blue]Si hoc signum legere potes, operis boni in rebus Latinus alacribus et fructuosis potiri potes![/blue]
Want the [red]best[/red] answers to your questions ? faq222-2244
 
I would try:
Code:
If RTrim(LTrim(ActiveCell.Value)) = "" Then


Dan.
 
Haha oh God i feel so stupid, its like the answer is right before my face...i think my problem is that i place too much emphasis on affect what is in the right side of the "=", forgetting that I can just as well apply a formula to the argument that is in the left side of the equal sign....thanks XLBO!!!
 
Don't feel stupid - as long as you remember this next time, it was a worthwhile exercise.... :)

Rgds, Geoff
[blue]Si hoc signum legere potes, operis boni in rebus Latinus alacribus et fructuosis potiri potes![/blue]
Want the [red]best[/red] answers to your questions ? faq222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top