Results 1 to 3 of 3

Thread: IF statement based on date
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    Board Regular
    Join Date
    Jun 2006
    Posts
    164
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default IF statement based on date

    Hi guys and girls....

    I am trying to see if there is a formula without having to use several boxes to work around it that gives me an "answer" depending on the input date/year.

    These are the cells I am trying to populate/use.

    C9 = date
    F9 = a number (changeable number)
    F10 = fixed number
    G9 = the formula I want. If it is a date in 2019 then it I want it to do a sum of F9+F10. If its a date in 2020, then returns 0.

    Hopes it helpful, and thanks in advance.

  2. #2
    MrExcel MVP
    Junior Admin
    Joe4's Avatar
    Join Date
    Aug 2002
    Posts
    51,042
    Post Thanks / Like
    Mentioned
    57 Post(s)
    Tagged
    11 Thread(s)

    Default Re: IF statement based on date

    Try:
    Code:
    =IF(YEAR(C9)=2019,F9+F10,0)
    Last edited by Joe4; Oct 21st, 2019 at 02:56 PM.
    TIPS FOR FINDING EXCEL SOLUTIONS
    1. Use the built-in Help that comes with Excel/Access
    2. Use the Search functionality on this board
    3. A lot of VBA code can be acquired by using the Macro Recorder.

    "Give a man a fish, feed him for a day. Teach a man to fish, feed him for life!"

  3. #3
    Board Regular
    Join Date
    Jul 2008
    Location
    France Alsace
    Posts
    1,317
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: IF statement based on date

    Try
    =IF(YEAR(C9)=2019,F9+F10,IF(YEAR(C9)=2020,0,))

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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