+ Reply to Thread
Results 1 to 14 of 14

if statement with dates and applying % increase based on specific months

  1. #1
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,224

    if statement with dates and applying % increase based on specific months

    hi all

    Please Login or Register  to view this content.

    In the attached file, we have a total of 4 price waves. The above formula works great, however, we have NOW plugged a date for each respective price wave.

    The price increase will still be cumulative. So the first wave can start 1-July-22 at 9.7%, then user inputs 1-Dec-22 at 5% for 2nd wave etc. It is also dependent on the frequency "column K".


    The formula in cell AU15 is based on single "effective date" in column M, but need help to modify it to add the effective dates for the respective price waves (new effective dates in column O, Q, S)

    pls see attached. can someone kindly help pls?

    thxs so much
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,224

    Re: if statement with dates and applying % increase based on specific months

    any thoughts on how to revise the formula?

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: if statement with dates and applying % increase based on specific months

    78 views including at least 6 downloads of the workbook - you may need to clarify what you are looking for.

    You could do with a simplified sample workbook and you SHOULD manually enter the results you are looking for in at least a few cells. I presume it's those highlighted in yellow?
    Last edited by AliGW; 08-08-2022 at 12:38 AM.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  4. #4
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,224

    Re: if statement with dates and applying % increase based on specific months

    Hi there

    I have provided an example in the attached workbook.

    If you go to cell AU17 (I have highlighted the row in red), that what the new formula should do. However, it is also contingent on "column K".

    Annually = 1 = each month
    Semi-annually = 2 = every 6 months
    Quarterly = 4 = every 4 months

    hope this example can help?

    thxs so much!
    Attached Files Attached Files
    Last edited by AliGW; 08-12-2022 at 01:06 AM. Reason: Please DON'T quote unnecessarily!

  5. #5
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,224

    Re: if statement with dates and applying % increase based on specific months

    any thoughts on this guys?

  6. #6
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,812

    Re: if statement with dates and applying % increase based on specific months

    As before, I think we are having trouble understanding exactly what you need help with.

    What I see in the formulas in AU17:BF17 is a conditional sum of the rates, then add 1, then multiply that by the original pricing to get the projected pricing. Am I understanding correctly so far?

    Assuming that is correct, my first thought was if the effective dates and wave rates can be arranged differently? My thinking here would be to use the SUMIFS() function for the conditional sum, and it would be easier if the dates and rates were arranged so that the dates were all together and the rates were all together. Instead of dates in columns M, O, Q, S, (rates immediately to the right of the date), would you be allowed to arrange the dates in M:P, and the rates in Q:T? Then the conditional sum becomes SUMIFS($Q17:$T17,$M17:$S17,"<="&AU$10) [in words -- "sum the rates where the effective dates are less than or equal to the date in AU10"]. The complete formula in U17 is then =AH5*(1+SUMIFS(...)) [pay attention to relative and absolute referencing] then copy/paste/fill across and down.

    I'm not sure that helps any.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  7. #7
    Forum Contributor
    Join Date
    07-21-2021
    Location
    Norfolk, UK
    MS-Off Ver
    Excel 2003, 2007, 2013, 2019
    Posts
    212

    Re: if statement with dates and applying % increase based on specific months

    If your business model permits, I would concentrate on the numbers of days after the start date that a particular rate applies. If necessary, work backwards from the number of days to a specific date.

    It would make your arithmetic and programming much easier.
    Regards,

    Stephen

  8. #8
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,224

    Re: if statement with dates and applying % increase based on specific months

    MrShorty

    Based on your recommendation, i have aligned the dates next to the each other, and the % increases together. Just not sure how to logically make the formula flow.

    in columna AU18 (red highlight), i have manually done the calculation to show as an example.

    any help on this would be great!
    Last edited by AliGW; 08-12-2022 at 01:07 AM. Reason: Please DON'T quote unnecessarily!

  9. #9
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,812

    Re: if statement with dates and applying % increase based on specific months

    Did you try the formula I proposed =AH5*(1+SUMIFS($Q17:$T17,$M17:$P17,"<="&AU$10))? It seems to work for me in your file. (note prior errata, I had mistakenly had the criteria range extend through column S).

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

    Re: if statement with dates and applying % increase based on specific months

    *** READ PREVIOUS MESSAGE FROM MrShorty FIRST ***

    if that isnt gonna work... then need a bit more info to understand the intent from your perspective...

    Can we first focus on what your formula is CURRENTLY doing

    From your initial post
    Please Login or Register  to view this content.
    IF M15... what? this does nothing...rendering the nested IF statement completely useless and really just fluff.

    Which comes from the new sheet AU Column...so to update the above it would be this out of the latest file you shared...
    Please Login or Register  to view this content.
    Removing the random lost IF we would be left with

    Please Login or Register  to view this content.
    But ... before I break it down... can you take the time to break down what this formula is doing... and WHY you were doing it...


    Once you do that, explain the NEW ELEMENT and how it would interact with the formula or what you feel you are missing and what the INTENT is.
    Last edited by ELeGault; 08-11-2022 at 05:16 PM.
    -If you think you are done, Start over - ELeGault

  11. #11
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,224

    Re: if statement with dates and applying % increase based on specific months

    Quote Originally Posted by MrShorty View Post
    Did you try the formula I proposed =AH5*(1+SUMIFS($Q17:$T17,$M17:$P17,"<="&AU$10))? It seems to work for me in your file. (note prior errata, I had mistakenly had the criteria range extend through column S).
    Hi I tried your formula, with what you just wrote.
    Please Login or Register  to view this content.
    If i paste your formula in cell AU17, it calculates accurately FOR ONLY May-June months (as its a cumulatives). Otherwise for cell AU17, it should only do AH17*Q17 (as that is the only month that has the increase until 1-Dec-22, when it should add Q17+R17 (9.7%+10.50%).

    hope that makes sense?
    Last edited by jw01; 08-12-2022 at 12:10 AM.

  12. #12
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,224

    Re: if statement with dates and applying % increase based on specific months

    @ELeGault

    Hi there

    thanks for your time and your reply.

    the initial formula was provided via the forum. however, it basically acts to apply the "4 waves % increase" based on when they are made effective, and should act cumulative.

    i tried your formula, with extending the effective date range and the % waves, however getting a "SPILL!" error in cell AU17:
    Please Login or Register  to view this content.
    i dont know how else to edit this formula. in my last attachment in red highlight, i have provided what the formula should do / answer it should provide.

    thxs again!
    Last edited by AliGW; 08-12-2022 at 01:07 AM. Reason: Please DON'T quote unnecessarily!

  13. #13
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: if statement with dates and applying % increase based on specific months

    Maybe try at AU17

    =IFERROR(IF($M17,AH17*(1+SUM($Q17:INDEX($Q17:$T17,IF($K17=1,MATCH(AU$10,$M17:$P17),YEARFRAC($M17,AU$10)*$K17+1)))*(AU$10>=$M17)),AH17),AH17)

  14. #14
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,812

    Re: if statement with dates and applying % increase based on specific months

    Otherwise for cell AU17, it should only do AH17*Q17 (as that is the only month that has the increase until 1-Dec-22, when it should add Q17+R17 (9.7%+10.50%).
    That's what should be happening with my formula. I notice that I have forgotten to mention that I believe your date in O17 is incorrect. You currently 1 May 2022, and I believe this should be 1 May 2023. This typo does create a problem for my formula, because 1 May 2022 is less than 1 Jul 2022, so it includes both corresponding rates in the sum.

    Of course, if I have assumed incorrectly and O17 should indeed be 1 May 2022, then there is something about the overall logic that I am not understanding.

    At this point, we are starting to get a few different solutions. Try the different solutions and see what is going to work for you.

+ 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. Calculate number of months in a specific year between two dates.
    By horanio in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-10-2019, 06:02 AM
  2. Formula for number of months for specific year between two dates
    By KalaiP in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-01-2018, 01:05 PM
  3. [SOLVED] Sum Months by specific dates
    By yuenk in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-28-2017, 10:25 AM
  4. [SOLVED] if statement based on cell increase
    By RachelMads02 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-05-2016, 01:40 PM
  5. Increase dates based on cell value
    By Chicaghost in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-31-2016, 02:25 PM
  6. Using Dates and Months in a IF statement
    By ZENO312 in forum Excel General
    Replies: 4
    Last Post: 08-19-2014, 12:13 AM
  7. I want to increase vacation rates on specific dates
    By wendyfam in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-18-2013, 06:49 PM

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