Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2011-03-09
5
Medium Priority
?
1,674 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 2000 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This article describes a serious pitfall that can happen when deleting shapes using VBA.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

876 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