showing zero in cell

C

Clare

Hi
Could you tell me how to get zero or blank with this formula:-

=(V4-U4) both columns are dates but if there is no date in column V4 then it
shows -38694 could you tell me what formula I need to put in to make this
show as zero or blank if there is no date in V4.

Thanks
 
P

Pete_UK

Try this:

=IF(OR(V4="",U4=""),"",V4-U4)

This will give a blank if either of the dates are missing. If you want
a zero, just change the third "" (in the middle of the formula) to 0.

Hope this helps.

Pete
 
Y

YESHWANT

Hi Clare,

I think you have the problem of cell formatting.

format your source cells as dates and result cell as general. I have tried
the formula given by Gary''s Student which works perfect with the above
formatting.

kindly check and click yes below, if it works
 
P

Pete_UK

You get that error if you try to do arithmetic on text values. The
only bit of arithmetic you are trying to do is to subtract U4 from V4.
Consequently, one, or both, of those cells contains some text (which
might happen to look like a numeric value or date). This might work
(using Gary''s formula):

=IF(V4="",0,V4*1-U4*1)

The *1 will try to convert the text value into a number.

Hope this helps.

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top