worksheet formula problem

L

Liketoknow

Hi..new to worksheet formula's and could use some guidance

i have created a worksheet with a formula in an entire row to calculate days
old.The formula looks at two cells and calculates the difference...thats the
easy part..works good =(c1-f14) etc

What i would like to know is
In the remaining cells down the row (containing formula) i get 38944 as a
value.even though there is no value in one of the date rows.Is there a way to
calculate only the populated rows and leave the others blank or with "0"

thanks in advance
 
K

Katherine Coombs

Hi there,

So you're only wanting Excel to perform the =(c1-f14) if both cells are
populated? You can use this formula instead:

=IF(AND(C1<>"",F14<>""),C1-F14,"")

What it's doing is telling it to perform C1-F14 if both C1 AND F14 are both
not blank. If that isn't true, ie is either one is blank, then it puts
nothing in there. The "" translates to 'blank'.

HTH,
Katherine
 
M

mehare

Seems like an easy fix but I'm slightly confused by the explaination.

Is the number you are always subtracting from C1 or does it change a
the formula is pasted
 
L

Liketoknow

Thnks for the quick reply...yes i was trying to subtract the date i enter
manually (f14 )etc from todays date (c1)

Katherines formula works great

Thanks for your help
 
Top