![]() |
Using IF function to perform calculation after specific date
I am having problems with the following formaula.
=IF(K2=0, "0",IF(E230/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? |
Using IF function to perform calculation after specific date
Try
=IF(K2=0,0,IF(E2DATE(2008,11,30),O2*(15/115),O2*(175/1175))) If this post helps click Yes --------------- Jacob Skaria "Aleksz17" wrote: I am having problems with the following formaula. =IF(K2=0, "0",IF(E230/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? |
Using IF function to perform calculation after specific date
Jacob's formula is correct. However, on Aleksz17's condition, what would
happen if the date is equal November 30, 2008? Just clarifying. Jacob Skaria wrote: Try =IF(K2=0,0,IF(E2DATE(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? -- Message posted via http://www.officekb.com |
All times are GMT +1. The time now is 05:26 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com