notblank?

nelsok

Board Regular
Joined
Jan 20, 2006
Messages
166
I dont think there is a funtion similar to isblank for testing if a cell isnotblank.

I can not use if in this case.

Can I multiply isblank()*-1 to get the opposite?


along with this question is.... can i use countif to do this? If so, does countif count as an if statment? the reason I ask is becuase I am at the max for nested ifs

any other suggestions?
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
Does this work?

If Not Application.Isblank(Range("A1")) Then
 

HalfAce

MrExcel MVP
Joined
Apr 6, 2003
Messages
9,454
can i use countif to do this?
You can use CountA to see if (for example) B1 is not blank.
=COUNTA(B1,"<>""")
This will return a zero if it's blank and a 1 if it's not.
It will not count as one of your allowed 7 nested ifs.

Does this help?
 

nelsok

Board Regular
Joined
Jan 20, 2006
Messages
166
Does this work?

If Not Application.Isblank(Range("A1")) Then

maybe you could tell me.

=IF(AND(OR(Q$6=1,Q$6=2,Q$6=3),notblank(H9)),VLOOKUP($N9&LOOKUP(Q$6,$A$2:$A$7,$B$2:$B$7),'Upload Pivot'!$A$5:$O$700,7,FALSE)*Q$5),IF(OR(Q6=4,Q6=5),"if the value is 4 or 5 do this",IF(OR(Q6=8,Q6=9,Q6=10,Q6=11,Q6=11,Q6=12),"do this if it is a prod request",IF(OR(Q6=12,Q6=13,Q6=14),"if it is an export allocation do this",LOOKUP(Q6,P602:P616,Q602:Q616)*Q5))))
 

nelsok

Board Regular
Joined
Jan 20, 2006
Messages
166

ADVERTISEMENT

can i use countif to do this?
You can use CountA to see if (for example) B1 is not blank.
=COUNTA(B1,"<>""")
This will return a zero if it's blank and a 1 if it's not.
It will not count as one of your allowed 7 nested ifs.

Does this help?

So i could use this in my and as COUNTA(B1,"<>""")=1


but i think there may be problem becuase the cell value is "" as given by another formula
 

Doug.T

Board Regular
Joined
Sep 19, 2006
Messages
80
would these work for you?

=(ISBLANK(a1)=FALSE)
or
=(LEN(A1)>0 )
 

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
50,698
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

nelsok

What about NOT(ISBLANK(H9))?

or

H9 <>""
 

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
I'm confused (no difference there then!) . Are you looking for a formulas or VBA?
 

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
50,698
Office Version
  1. 365
Platform
  1. Windows
So, will this do it?

=IF(AND(OR(Q$6=1,Q$6=2,Q$6=3),H9<>""),VLOOKUP($N9&LOOKUP(Q$6,$A$2:$A$7,$B$2:$B$7),'Upload Pivot'!$A$5:$O$700,7,FALSE)*Q$5),IF(OR(Q6=4,Q6=5),"if the value is 4 or 5 do this",IF(OR(Q6=8,Q6=9,Q6=10,Q6=11,Q6=11,Q6=12),"do this if it is a prod request",IF(OR(Q6=12,Q6=13,Q6=14),"if it is an export allocation do this",LOOKUP(Q6,P602:P616,Q602:Q616)*Q5))))
 

Forum statistics

Threads
1,141,913
Messages
5,709,306
Members
421,626
Latest member
indigochild

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
Top