How does Excel recognise a blank cell within IF function...

papichulo184

New Member
Joined
Feb 28, 2007
Messages
32
Hi All,

How can i return a blank cell if the formula is looking at a blank cell with IF function?

E.g. IF(A1=" "," "," ")

(This is part of a bigger statement which returns a date if and when there is a date in the cell, if there isn't it comes up with an answer even though it should be blank)

Many thanks :)
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Define "blank" cell?

Try one of the following:

=IF(A1="","Blank","Not blank")
=IF(ISBLANK(A1),"Blank","Not blank")
 
Upvote 0
Hi

I think the problem may be that " " represents a Null field rather than a zero-length field, changing the condition to "" might solve the difficulty

Robert
 
Upvote 0
Thanks both,

This is the other part of the formula...

=IF(A1>TODAY(),"Y","N")


Now i need to add - If A1 is blank i.e. has no data in it, i want A2 to be blank also (A2 contains the formula)

Hope that helps... :)


edit: sorry having trouble getting the formula to show up.... - Got it...
 
Last edited:
Upvote 0
Not working :(

If A1 is blank i want A2 (cell with formula in) to be blank also

and

If A1 (date) is greater than A3 (date) then i want it to show "Y" or "N"

I can understand the 2nd part and have that working but i just cant get an empty cell in A1 to return an empty cell in A2, and dont know how to add another IF into an IF formula!

I hope that clarifies a little :)


PS if have this so far... =IF(A1="","","")(A1>TODAY(),"Y","N")
 
Upvote 0
This formula in A2:

=IF(A1="","",IF(A1>A3,"Y","N"))

If that doesn't work, then tell me what it DOES do.

What's in A1? A manually entered date?
 
Upvote 0
Hi all. This thread was the closest thing I could find to the problem I am having. The solution shown on this page did not work for me.

I'm creating an encrypting "program" where you enter a word or group of words and a lookup command will retrieve the letter typed and change it to a number.
My problem is that as the formula stands now, a single word works fine and any cells after the numbered cells (after encryption) remain blank. BUT if there are a group of words, every blank cell in between the encrypted words returns an N/A#. I don't know why those would cause the error when the rest of the line does not.

Here is what I've got (please note that I did not copy/paste the entire LOOKUP section) and notice the error at G18:
Cryptactic.xls
ABCDEFGHIJKLMNOPQRSTUVWXYZ
12stupiderror
13
14ENCRYPT
15
16
17stupid error              
18788743#37767              
19
20
21
22
23
24
25A2
26B2
27C2
28D3
29E3
Sheet1
 
Upvote 0
Hi Steve

every blank cell in between the encrypted words returns an N/A#.

If I understand correctly there are no blank cells in between words.

You are using the MID() function to extract the characters and so betweeen words you have a space.

Have you included a space in your conversion table? How do you want to deal with spaces?

P. S.

Next time it would be better to open a new thread, as this is a new problem. You could include a link to this thread.
 
Upvote 0

Forum statistics

Threads
1,214,390
Messages
6,119,235
Members
448,879
Latest member
VanGirl

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