Using IF function to perform calculation after specific date

A

Aleksz17

I am having problems with the following formaula.

=IF(K2=0, "0",IF(E2>30/11/2008,O2*(15/115),O2*(175/1175)))

I want a cell to display 0 if K2=0. If K2 doesn't equal 0, I want excel to
perform one of two calculations using a vlaue in O2 depending on what date is
in E2. If the date is prior to 30 Novemeber 2008 I want excel to perform
O2*(175/1175). If the date is after 30 November 2008 then I want excel to
perform O2*(15/115).

Currently excel sometimes uses the wrong calculation as it doesn't recognise
'30/11/2008' as a date but as a calculation i.e 30 divided by 11 divided by
2008.

The issue is that I want Excel to recognise '30/11/2008' as the date, 30
November 2008, and not 30 divided by 11 divided by 2008. Is there any way
that I can get excel to do this?
 
J

Jacob Skaria

Try

=IF(K2=0,0,IF(E2>DATE(2008,11,30),O2*(15/115),O2*(175/1175)))


If this post helps click Yes
 
P

pogiman via OfficeKB.com

Jacob's formula is correct. However, on Aleksz17's condition, what would
happen if the date is equal November 30, 2008?

Just clarifying.


Jacob said:
Try

=IF(K2=0,0,IF(E2>DATE(2008,11,30),O2*(15/115),O2*(175/1175)))

If this post helps click Yes
---------------
Jacob Skaria
I am having problems with the following formaula.
[quoted text clipped - 13 lines]
November 2008, and not 30 divided by 11 divided by 2008. Is there any way
that I can get excel to do this?
 

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