+ Reply to Thread
Results 1 to 3 of 3

Nested IF formula to return value based on date but stop after 12 quarters

  1. #1
    Registered User
    Join Date
    03-27-2012
    Location
    Tampa, FL
    MS-Off Ver
    Excel for M365
    Posts
    53

    Question Nested IF formula to return value based on date but stop after 12 quarters

    Hello Excel Gurus,
    I am struggling a bit. Pretty sure I have about half of what I need, but what I attempting to do is ask Excel to look at an input date and then look at the quarter start & end date and if the date falls within the quarter start & end dates to populate quarterly revenue. I have the formula working when when it identifies the first relevant quarter. The problem is I then need the formula to move forward in time - so next row would populate the next quarter's revenue and so one for 12 consecutive quarters (3 years), then I need the formula to return $0s again. I am attaching a mock up file for explanatory purposes.

    Date: cell C7
    Column with current formula: F, starting in F42, you can see formula is correct starting in cell F46 (brings in cell C11 from above) however cell F47 needs to populate what's in C12 on onward for 12 quarters. Starting in cell F58 the value should be $0 again

    Please let me know if any question.
    Attached Files Attached Files
    Last edited by Jess0121; 05-06-2022 at 03:41 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    11-22-2014
    Location
    Arizona, USA
    MS-Off Ver
    Office 365
    Posts
    973

    Re: Nested IF formula to return value based on date but stop after 12 quarters

    Can we talk about the intent of this field.

    You want it to lookup the revenue for the given quarter IF the current rows Period End is Less than or Equal to your call out for the Realized Revenue Start Date.

    When that is true you are referencing the total revenue... not looking it up...so it is always looking at C$11 <-- Locked to Y1 Q1 Total Rev... Should this not be unlocked as C11? so that the reference moves with it?
    *Keep reading because this is not the answer... we need to shift based on values -

    Once you are outside of 3 years (12 rows/records) you will no longer have a point of reference as you start referring to totals starting at line 23... now this breaks the reference...

    I guess... if you change the date above that will offset the point in which it starts to review... so I think what you need to do is say IF AND

    IF the Realized Revenue Date is Less than Quarter End AND the Realized Revenue Date IS GREATER THAN the Quarter End - 3 Years then lookup the first quarter in the series assuming this is the first quarter...

    there is nothing in the formula telling it which year we are in compared to the Referenced Date...

    So now we understand we need to have a quarter review compared to the realized date.


    This means we need to say first is this quarter after the referenced date... you have that already

    Now we need to say How many Quarters in are we from the referenced date...

    Please Login or Register  to view this content.
    Where the
    ENDDATE is the PERIOD END
    STARTDATE = Realized Revenue "Start Date"

    Finally...this should do the trick... it can be much prettier if you had real dates or even quarters since in a column... to reference for the offset

    Please Login or Register  to view this content.
    -If you think you are done, Start over - ELeGault

  3. #3
    Registered User
    Join Date
    03-27-2012
    Location
    Tampa, FL
    MS-Off Ver
    Excel for M365
    Posts
    53

    Re: Nested IF formula to return value based on date but stop after 12 quarters

    WOW!
    I would just like to say THANK YOU for taking the time to talk through the logic of your answer. It really helped me see all the different nested components within the formula itself. I confirm it works and I will take these logic steps with me going forward. Thanks again!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 03-14-2022, 06:06 PM
  2. [SOLVED] Stop date formula based on end on month
    By DawnAZ in forum Excel General
    Replies: 14
    Last Post: 02-26-2019, 07:32 AM
  3. Replies: 6
    Last Post: 05-11-2018, 03:55 AM
  4. Formula to stop the counting based on date
    By joseph_yap22 in forum Excel Formulas & Functions
    Replies: 27
    Last Post: 08-20-2013, 07:58 AM
  5. formatting cells with quarters based on date ranges
    By nheb in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-09-2013, 11:11 AM
  6. Replies: 15
    Last Post: 04-08-2013, 12:40 PM
  7. Formula based on quarters (maybe Sumproduct)
    By SalamanderSam14 in forum Excel General
    Replies: 2
    Last Post: 11-14-2012, 12:37 PM

Tags for this Thread

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