Solved

How to make my formula return blank value rather than "0"

Posted on 2011-03-09
5
1,612 Views
Last Modified: 2012-05-11
Hello,

I am using the following formula to automatically populate a spreadsheet with some default values.

=IF(ISERROR(INDEX(Sheet1!$A$25:$AD$10000,$B4,H$2)),0,INDEX(Sheet1!$A$25:$AD$10000,$B4,H$2))

However, in the above example if the value in Sheet1 is blank i.e an empty cell, excel returns 0/01/1900 as the result.

How can I get excel to return a blank cell rather than 0/01/1900?

Both the source and destination cell are formatted as "Date".
0
Comment
Question by:vegas86
  • 2
  • 2
5 Comments
 
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 35089763

=IF(ISERROR(INDEX(Sheet1!$A$25:$AD$10000,$B4,H$2)),"",INDEX(Sheet1!$A$25:$AD$10000,$B4,H$2))

Kevin
0
 

Author Comment

by:vegas86
ID: 35089788
Hi Kevin,

I tried that before I posted my question and again after you suggested it but it is still coming up with 0/01/1900
0
 
LVL 50

Accepted Solution

by:
barry houdini earned 500 total points
ID: 35089792
You could stay with the existing formula and just format the formula cell with this custom format

d/mm/yyyy;;

then zeros display as blank.....or in Excel 2010 you could shorten the formula by using IFERROR, i.e.

=IFERROR(INDEX(Sheet1!$A$25:$AD$10000,$B4,H$2),"")

regards, barry
0
 
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 35089797
Then set the format as Barry has suggested.

Kevin
0
 

Author Closing Comment

by:vegas86
ID: 35089833
Works perfectly!! thank you so much!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now