Date in if statment

kings21

Board Regular
Joined
Mar 13, 2007
Messages
62
How do I enter a date in an if statement? I need to calculate cost directly associated with a workers wage. They got a raise on a certain date so if it's before that date i need to multiply by 23 and after by 24. I tried this but it doesn’t seem to be working.

=IF(C40>4/30/2008,IF(D39=""," -",IF(D39="J",F39*24.5,IF(D39="D",F39*27.5,IF(D39="F",F39*23,IF(D39="An",F39*27,IF(D39="Al",F39*14)))))),IF(D35=""," -",IF(D35="J",F35*24.5,IF(D35="D",F35*27.5,IF(D35="F",F35*22,IF(D35="An",F35*27,IF(D35="Al",F35*14)))))))
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Written like that, excel reads it like

iF C40 > (4 Devided by 30 devided by 2008)

Couple ways to do it..
If(C40>"4/30/2008"*1
or
If(C40>DATE(2008,4,30)
or
IF(C40>A1 'Where A1 = 4/30/2008

Hope this helps...
 
Upvote 0
Hi kings21,

One problem is that nested 'if' statements are limited to 7 'ifs'.

You will have to rethink your task!

Kelbo
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,255
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top