+ Reply to Thread
Results 1 to 8 of 8

IF formula for several date ranges.

  1. #1
    Registered User
    Join Date
    06-12-2020
    Location
    Belfast
    MS-Off Ver
    Office 365
    Posts
    4

    IF formula for several date ranges.

    Hi,

    I'm trying to write what I think will be an IF formula. I need to check against a large number of receipt dates, and then categorise each of them using the aged categories and date range below

    PO Accrual > 18 Months 31/12/2018
    PO Accrual > 15 Months < 18 Months 01/01/2019 31/03/2019
    PO Accrual > 12 Months < 15 Months 01/04/2019 30/06/2019
    PO Accrual < 12 Months 01/07/2019


    I need them categorised so I can run a SUMIF and total each aged category.

    I've attached a really brief worksheet showing the format in case my description is confusing. Any help would be really appreciated.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: IF formula for several date ranges.

    Hi,
    Do you count the months relative for today?

    Ifso- maybe this formula can asist :

    In E1:
    =today()

    In D2:
    =IF(($E$1-C2)/365*12>18,"31/12/2018",IF(AND(($E$1-C2)/365*12>15,($E$1-C2)/365*12<18),"01/01/2019-31/03/2019",IF(AND(($E$1-C2)/365*12>12,($E$1-C2)/365*12<15),"01/04/2019-30/06/2019",IF(($E$1-C2)/365*12<12,"01/07/2019"))))
    Attached Files Attached Files
    Last edited by Limor_OP; 07-17-2020 at 03:37 PM.

  3. #3
    Registered User
    Join Date
    06-12-2020
    Location
    Belfast
    MS-Off Ver
    Office 365
    Posts
    4

    Re: IF formula for several date ranges.

    Hi,

    Thanks for your reply! The date I will be using for this one will be 30th June 2020, which is the end of the period. What I'm trying to get in Column D is the relevant category from column F depending on how the date in column C relates to the date ranges in columns G and H.
    So for example the date in C2 would return 'PO Accrual > 18 Months' in Column D2, and the date in C7 would return 'PO Accrual < 12 Months' in column D7. I need to put the dates into the specific categories in F1 to F4.

  4. #4
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: IF formula for several date ranges.

    OK, you should have said these things in your initial post (no one can guess), notice that you didnt receive any replies because of that, your instructions were missing essential data.

    Any way

    change the date in E1 to 30/6/2019

    and apply this formula in D2 and down:
    =IF(C2="","",IF(($E$1-C2)/365*12>18,$F$1,IF(AND(($E$1-C2)/365*12>15,($E$1-C2)/365*12<18),$F$2,IF(AND(($E$1-C2)/365*12>12,($E$1-C2)/365*12<15),$F$3,IF(($E$1-C2)/365*12<12,$F$4)))))

    Good luck.

  5. #5
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: IF formula for several date ranges.

    With vlookup to get the data. (see the yellow cells)

    With a pivot table (see the green cells).
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  6. #6
    Registered User
    Join Date
    06-12-2020
    Location
    Belfast
    MS-Off Ver
    Office 365
    Posts
    4

    Re: IF formula for several date ranges.

    Thanks again for your help.

  7. #7
    Registered User
    Join Date
    06-12-2020
    Location
    Belfast
    MS-Off Ver
    Office 365
    Posts
    4

    Re: IF formula for several date ranges.

    Hi,

    Thanks for your help!

  8. #8
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: IF formula for several date ranges.

    Since you got answers of several forummembers it is good to add to whom you replying.

+ 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: 7
    Last Post: 10-19-2018, 08:09 AM
  2. [SOLVED] Date ranges & SUM formula?
    By clairejasper in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-11-2017, 02:28 AM
  3. Formula Help - Date Ranges
    By gigglesmumpty in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-26-2016, 03:46 AM
  4. Formula help with date ranges
    By IanMcC in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-08-2013, 07:23 AM
  5. Help with formula looking at Date ranges?
    By Simon L in forum Excel General
    Replies: 12
    Last Post: 12-11-2008, 10:11 AM
  6. Date ranges in a sum formula
    By Marcus Caterino in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-26-2006, 05:50 PM
  7. Need formula for date ranges Please &amp;amp; Thanks
    By Digital2k in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-24-2006, 06:25 AM

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