View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Motaad Motaad is offline
external usenet poster
 
Posts: 20
Default if statements and formulas

I am trying to write an "if" statement such as
if a column cell equals the number 7 substract the date in one column from a
date in another column

=if(e2=7,h2-f2,0) - h2 being a date column and f2 being a date column

Unfortunately it always gives me a zero even if there is a 7 in column e2.
--
Motaad