+ Reply to Thread
Results 1 to 7 of 7

IF Statement Question dealing with Dates

Hybrid View

  1. #1
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2021
    Posts
    974

    IF Statement Question dealing with Dates

    Does anyone know if I can use an IF statement to deal with dates? I need to use an IF statement to use one wage before a certain date and another wage if after a different date. i.e. anything before April 1st is one wage and employees get a raise afterwards which will affect my spreadsheet and I need it to use the raise formula if after April 1st. I hope this makes sense.
    I'm using Excel 2007 if that would help any...

    Thanks in advance!

  2. #2
    Valued Forum Contributor
    Join Date
    02-09-2006
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 2016
    Posts
    1,077
    Assuming your data is in columns A & B, like this:

    oldwage newwage
    5 10

    try this in column C:

    =IF(TODAY()<1/4/7,A2,B2)
    Trish in Oz
    -------------
    A problem well defined is a puzzle half solved


    If you attach a sample of your workbook it will be easier to find a solution. Remember to remove/replace sensitive data before uploading the file. Look here if you need help with attachments:
    http://www.excelforum.com/faq.php?fa...b3_attachments

  3. #3
    Forum Expert
    Join Date
    09-09-2005
    Location
    England
    MS-Off Ver
    2007
    Posts
    1,500
    It is not clear in which year 1/4/7 falls if it is a or b

    =IF(A1<39173,1,2)

    if 1 is the first rate and 2 is the seond rate and the date to be evaluated is in a1.

    39173 is the 1st of April 2007 as a number

    the < may need to be <= depending which year the 1st april is in

    Regards

    Dav

  4. #4
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2021
    Posts
    974

    Thanks Dav

    I'm attaching a very simple test file that will hopefully show what I'm trying to accomplish. It has comment messages as well. Ideally each sheet will reflect an individual employee, who will be assigned their own ID#. The overtime issues is split into two columns in the mere chance I have two employees who want to split an eight hour day resulting from a particular sheet (i.e.) employee who called in sick, etc. In this example sheet1 represents an employee who called in sick and I'm entering data for the employees who our covering the shift. Unfortunately due to size restraints I can only make this a 2page sample. I really need the date column(A) to affect the pay scale for the individual employees that our covering the shift hours. That is why I needed to have the ID system. I'm finding it very difficult for the date issue to cover the varying pay rates for the various sheets I will have. At this point I can't even get it to do sheet2? Any suggestions?? Thanks for any/all input!
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    09-09-2005
    Location
    England
    MS-Off Ver
    2007
    Posts
    1,500
    Perhaps you could add more sheets, as delete a few lines at the bottom makes you file much smaller.

    If you take care naming your sheets exactly the same as the staff names in the lookup table this may work. If you has used the sheets named as sheet1 to sheet99 relating to the employees the formula would have been simpler.

    regards

    Dav
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2021
    Posts
    974

    Thanks DAV!!

    I just woke up, and haven't had much time to see all the particulars, but I like what you've done and I think It will work! Thanks a lot!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1