Check if Blank and Return another cell

Bazabelle

New Member
Joined
Oct 6, 2022
Messages
34
Office Version
  1. 365
Platform
  1. Windows
Ok, so I have the formula to check in a cell and if it's blank to return the other one instead. So if I have a date in Actual to take that one, if the cell is empty to take the planned.

I tried with "False" it works to show if there is a date in actual but does not provide planned dates, if I put "True" then it returns the planned date regardless if the actual is there.

to make it simple,

"False" returns only actuals

=IF(ISBLANK(Vlookup(A2, 'Sheet 1'A:Y, 12, FALSE)), Vlookup(A2, 'Sheet 1'A:Y, 11, FALSE), Vlookup(A2, 'Sheet 1'A:Y, 12, FALSE)

and "true" returns only planned

=IF(ISBLANK(Vlookup(A2, 'Sheet 1'A:Y, 12, TRUE)), Vlookup(A2, 'Sheet 1'A:Y, 11, FALSE), Vlookup(A2, 'Sheet 1'A:Y, 12, TRUE)

Thanks in advance
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
so if a value returned to vlookup is a clear cell then it will be blank and ISBLANK will return TRUE - and does the true vlookup
if it cannot find the value then it returns a N/A error - Then that is FALSE and does the false vlooklup of the IF statements

ISBLANK(Vlookup(A2, 'Sheet 1'A:Y, 12, FALSE))

so when it lookup in column A for the value in A2 - and finds the value - if its BLANK - then that is TRUE
if it cannot find A2 in A - then false

FALSE - is exact value

so if no actual values have been emtered , then isblank will be true - BUT it may see a formula

mocked up example
Book1
ABCDEFG
1actualPlanned
2a110
3Planned / Actuall;ookupb220
430cc30
5d440
61a
Sheet1
Cell Formulas
RangeFormula
A4A4=IF(ISBLANK(VLOOKUP(C4,E2:G6,2,FALSE)), VLOOKUP(C4,E2:G6,3,FALSE),VLOOKUP(C4,E2:F6,2,FALSE))
A6A6=IF(ISBLANK(VLOOKUP(C6,E2:G6,2,FALSE)), VLOOKUP(C6,E2:G6,3,FALSE),VLOOKUP(C6,E2:F6,2,FALSE))


you can see lookup value in C4 and C6 - and the result in A4 and A6 - A4 brings back planned because C - actual is clear


A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC , then put the sample spreadsheet onto a share
I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed
 
Last edited:
Upvote 0
Thanks, this is strange, my formula is like yours but not working properly. I did try to download the XL2BB but its not working on my side. I will retry later.
 
Upvote 0
or as i said
OR if you cannot get XL2BB to work, or have restrictions on your PC , then put the sample spreadsheet onto a share
I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed

Last edited: 24 minutes ago

you sure the cell is blank

Or is there a formula in the cell that creates a ""
if a formula - you get nothing back

A4 formula is changed

A7 is the same formula - BUT with a formula producing a ""

have a look here
Book1
ABCDEFG
1actualPlanned
2a110
3Planned / Actuall;ookupb220
430cc 30
5d440
61a
7 c
8
Sheet1
Cell Formulas
RangeFormula
A4A4=IF(VLOOKUP(C4,E2:G6,2,FALSE)="", VLOOKUP(C4,E2:G6,3,FALSE),VLOOKUP(C4,E2:F6,2,FALSE))
F4F4=IF(1,"","")
A6:A7A6=IF(ISBLANK(VLOOKUP(C6,E2:G6,2,FALSE)), VLOOKUP(C6,E2:G6,3,FALSE),VLOOKUP(C6,E2:F6,2,FALSE))
 
Last edited:
Upvote 0
Solution
or as i said


you sure the cell is blank

Or is there a formula in the cell that creates a ""
if a formula - you get nothing back

A4 formula is changed

A7 is the same formula - BUT with a formula producing a ""

have a look here
Book1
ABCDEFG
1actualPlanned
2a110
3Planned / Actuall;ookupb220
430cc 30
5d440
61a
7 c
8
Sheet1
Cell Formulas
RangeFormula
A4A4=IF(VLOOKUP(C4,E2:G6,2,FALSE)="", VLOOKUP(C4,E2:G6,3,FALSE),VLOOKUP(C4,E2:F6,2,FALSE))
F4F4=IF(1,"","")
A6:A7A6=IF(ISBLANK(VLOOKUP(C6,E2:G6,2,FALSE)), VLOOKUP(C6,E2:G6,3,FALSE),VLOOKUP(C6,E2:F6,2,FALSE))
Thats its!! there is a formula indeed :)
 
Upvote 0
ok,
so did the alternative formula work OK for you ?
 
Upvote 0

Forum statistics

Threads
1,214,975
Messages
6,122,538
Members
449,088
Latest member
RandomExceller01

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