+ Reply to Thread
Results 1 to 4 of 4

If statement with "left" condition applied to a date

  1. #1
    Forum Contributor Portuga's Avatar
    Join Date
    02-20-2004
    Location
    Portugal
    MS-Off Ver
    365
    Posts
    852

    If statement with "left" condition applied to a date

    Hi,

    I want to identify, by looking at a date, if we are at the first half of the month or second half of the month as these employees are paid on the 15th or the 30 31st

    I thought of applying the following formula to a cell containing the date 31/01/2008

    If(left(A1;2)>15;"2nd Half";"1st Half"

    But I get the result as 1st half. It seems this formula doesnt work for numeric vales.

    Any ideas?
    Thanks
    Last edited by Portuga; 03-11-2008 at 06:59 PM.

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885
    Hi Portuga,

    Try:

    =IF(DAY(A1)>15,"2nd Half","1st Half")

    I assumed you want '2nd Half' returned if the day is greater than 15, not '1st half' as you had in your example formula.

  3. #3
    Forum Contributor Portuga's Avatar
    Join Date
    02-20-2004
    Location
    Portugal
    MS-Off Ver
    365
    Posts
    852
    [QUOTE=pjoaquin]Hi Portuga,

    Try:

    =IF(DAY(A1)>15,"2nd Half","1st Half")

    QUOTE]

    Gracias!

  4. #4
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885
    De nada.

+ 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