#1   Report Post  
PW
 
Posts: n/a
Default IF Formuala

the formula that I am trying does not return the results that I need.

=IF(C16<="14-Sep-05",SUM(F16*$S$1),IF(C16="15-Sep-05",SUM(F16*$S$2)))

Cell C16= date
Cell F16= Kilometers
Cell S1=0.37
and
Cell S2=0.40

The result I am getting is for the first part of the formula and not for the
second part when the date is greater than or equal to 15-Sep-05.

  #2   Report Post  
Duke Carey
 
Posts: n/a
Default

put your date text strings inside the DATEVALUE() function


=IF(C16<=DATEVALUE("14-Sep-05"),SUM(F16*$S$1),IF(C16=DATEVALUE("15-Sep-05)",SUM(F16*$S$2)))

"PW" wrote:

the formula that I am trying does not return the results that I need.

=IF(C16<="14-Sep-05",SUM(F16*$S$1),IF(C16="15-Sep-05",SUM(F16*$S$2)))

Cell C16= date
Cell F16= Kilometers
Cell S1=0.37
and
Cell S2=0.40

The result I am getting is for the first part of the formula and not for the
second part when the date is greater than or equal to 15-Sep-05.

  #3   Report Post  
Bernard Liengme
 
Posts: n/a
Default

I suspect you have real dates in C16 but in your formula you are using text
Try =IF(C16<=DATE(2005,9,15),.........
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"PW" wrote in message
...
the formula that I am trying does not return the results that I need.

=IF(C16<="14-Sep-05",SUM(F16*$S$1),IF(C16="15-Sep-05",SUM(F16*$S$2)))

Cell C16= date
Cell F16= Kilometers
Cell S1=0.37
and
Cell S2=0.40

The result I am getting is for the first part of the formula and not for
the
second part when the date is greater than or equal to 15-Sep-05.



  #4   Report Post  
PW
 
Posts: n/a
Default

Thank you for your help. The formula now works.

Have a great day
PW

"Duke Carey" wrote:

put your date text strings inside the DATEVALUE() function


=IF(C16<=DATEVALUE("14-Sep-05"),SUM(F16*$S$1),IF(C16=DATEVALUE("15-Sep-05)",SUM(F16*$S$2)))

"PW" wrote:

the formula that I am trying does not return the results that I need.

=IF(C16<="14-Sep-05",SUM(F16*$S$1),IF(C16="15-Sep-05",SUM(F16*$S$2)))

Cell C16= date
Cell F16= Kilometers
Cell S1=0.37
and
Cell S2=0.40

The result I am getting is for the first part of the formula and not for the
second part when the date is greater than or equal to 15-Sep-05.

  #5   Report Post  
PW
 
Posts: n/a
Default

THank you for your help. The formula now does work.

Have a great day

PW

"Bernard Liengme" wrote:

I suspect you have real dates in C16 but in your formula you are using text
Try =IF(C16<=DATE(2005,9,15),.........
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"PW" wrote in message
...
the formula that I am trying does not return the results that I need.

=IF(C16<="14-Sep-05",SUM(F16*$S$1),IF(C16="15-Sep-05",SUM(F16*$S$2)))

Cell C16= date
Cell F16= Kilometers
Cell S1=0.37
and
Cell S2=0.40

The result I am getting is for the first part of the formula and not for
the
second part when the date is greater than or equal to 15-Sep-05.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 01:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"