+ Reply to Thread
Results 1 to 6 of 6

Multiple IF conditions with dates, how to

  1. #1
    Registered User
    Join Date
    10-15-2008
    Location
    slovenia
    Posts
    42

    Multiple IF conditions with dates, how to

    Hello,

    what I want to do is have a formula do the following:

    If date in A2 is from 1.1.2008 to 31.3.2008 then write "Q1" in A1
    If date in A2 is from 1.4.2008 to 30.6.2008 then write "Q2" in A1
    If date in A2 is from 1.7.2008 to 30.9.2008 then write "Q3" in A1
    If date in A2 is from 1.10.2008 to 31.12.2008 then write "Q4" in A1

    Please help me on this one.

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Determine Qtr from a Date

    With
    A2: (a date)

    This formula returns the quarter containing that date:
    Please Login or Register  to view this content.
    Does that help?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    10-15-2008
    Location
    slovenia
    Posts
    42
    thank you very much!

  4. #4
    Registered User
    Join Date
    10-15-2008
    Location
    slovenia
    Posts
    42
    Hello,

    I have another problem. I am using these quarters for a table of cash flow.
    The thing with only Q1 Q2 Q3 Q4 is only good for one year.
    But what if I am expecting some income on 02.Jan.2009, then I would like excel to write Q1-09. Do you see what I mean?
    Can that be solved with IF somehow. I think one way would be to just make a list of all dates and then use VLOOKUP, but there's got to be another alternative.

    Please advise,

    Kind regards

  5. #5
    Forum Expert
    Join Date
    09-09-2005
    Location
    England
    MS-Off Ver
    2007
    Posts
    1,500
    ="Q"&CEILING(MONTH(A2)/3,1)&"-"&TEXT(A2,"YY")

    Regards

    Dav

  6. #6
    Registered User
    Join Date
    10-15-2008
    Location
    slovenia
    Posts
    42
    knowledge of you guys just blows my mind Or it's just my inexperience

    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