+ Reply to Thread
Results 1 to 7 of 7

Easy Date Incrementation in a formula

  1. #1
    Registered User
    Join Date
    06-30-2016
    Location
    Leeds
    MS-Off Ver
    2010
    Posts
    4

    Easy Date Incrementation in a formula

    Hi guys,
    I run an analysis sheet each month where the dates in the formula increase each month to give me a years figure in each cell.

    For instance, I would get data that shows my current fleet levels, and I need to pull data out to give me totals of those drivers that have been with us between 12 and 23 Months. I currently use a formula as below:
    =COUNTIFS('National Working Fleet'!$E:$E,">=01/06/2014",'National Working Fleet'!$E:$E,"<=31/05/2015",'National Working Fleet'!$F:$F,"",'National Working Fleet'!$G:$G,"On-Circuit").

    In the row below I would change the dates in the formula to give me those that have worked for us between 24 and 35 months, using the formula:
    =COUNTIFS('National Working Fleet'!$E:$E,">=01/06/2013",'National Working Fleet'!$E:$E,"<=31/05/2014",'National Working Fleet'!$F:$F,"",'National Working Fleet'!$G:$G,"On-Circuit").

    What I am looking to do is find an easy way of incrementing the dates by one month each month, rather than have to manually change each cells formula.

    Is there an extra bit of formula I can add (and where can I add it), so that I can just fill downwards from one cell and it changes accordingly?

    Many thanks in anticipation

    Martin
    Last edited by MartinS2016; 06-30-2016 at 11:38 AM.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,337

    Re: Easy Date Incrementation in a formula

    Simply put your dates in Cells;

    =COUNTIFS('National Working Fleet'!$E:$E,">=" & X1,'National Working Fleet'!$E:$E,"<=" & X2,'National Working Fleet'!$F:$F,"",'National Working Fleet'!$G:$G,"On-Circuit").

    X1 and X2 contain your dates

  3. #3
    Registered User
    Join Date
    06-30-2016
    Location
    Leeds
    MS-Off Ver
    2010
    Posts
    4

    Re: Easy Date Incrementation in a formula

    Thanks for that.

    But that will not work as I get the data from another report that has the dates in 2 columns, as per the attached image.

    Is there any other way to do this

    Thanks
    Attached Images Attached Images

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,337

    Re: Easy Date Incrementation in a formula

    Post a small sample file showing expected results.

  5. #5
    Registered User
    Join Date
    06-30-2016
    Location
    Leeds
    MS-Off Ver
    2010
    Posts
    4

    Re: Easy Date Incrementation in a formula

    Hi John,I have attached the sample sheet as you have asked.

    I am grateful to you for you looking at this. It has got me confused.

    Kind Regards
    Attached Files Attached Files

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Easy Date Incrementation in a formula

    It's not as easy as just incrimenting the month, because you also have to consider the DAY in the Ending Date
    31/05/2015 would need to cnange to 30/06/2015 (both Month AND Day changed)

    To accomodate that, I suggest making the End date the 1st of the Next month, and use < instead of <=
    =COUNTIFS('National Working Fleet'!$E:$E,">=01/06/2014",'National Working Fleet'!$E:$E,"<01/06/2015",'National Working Fleet'!$F:$F,"",'National Working Fleet'!$G:$G,"On-Circuit").

    Now you only have to incriment the month.
    Try

    =COUNTIFS('National Working Fleet'!$E:$E,">="&DATE(2014,6+ROWS(A$1:A1)-1,1),'National Working Fleet'!$E:$E,"<"&DATE(2015,6+ROWS(A$1:A1)-1,1),'National Working Fleet'!$F:$F,"",'National Working Fleet'!$G:$G,"On-Circuit").

  7. #7
    Registered User
    Join Date
    06-30-2016
    Location
    Leeds
    MS-Off Ver
    2010
    Posts
    4

    Re: Easy Date Incrementation in a formula

    Many thanks guys, that has worked a treat.

    Kind Regard

    Martin

+ 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. Easy Date Vba
    By LewisLonsdale in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-20-2015, 09:04 AM
  2. [SOLVED] Easy date function help
    By gtaaccord in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-11-2013, 12:16 PM
  3. cell incrementation
    By everythingneon in forum Excel General
    Replies: 2
    Last Post: 07-01-2011, 11:00 AM
  4. Help with incrementation
    By s.walsh87 in forum Excel General
    Replies: 2
    Last Post: 07-15-2010, 04:01 AM
  5. Scroller Incrementation
    By unique in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 12-04-2005, 06:25 PM
  6. Scroller Incrementation:dynamic chart working,
    By unique in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-04-2005, 11:20 AM
  7. Row incrementation not working.
    By Brian in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-09-2005, 02:06 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