+ Reply to Thread
Results 1 to 20 of 20

increment cells based on date

  1. #1
    Registered User
    Join Date
    02-20-2015
    Location
    Seoul, S. Korea
    MS-Off Ver
    Excel
    Posts
    10

    increment cells based on date

    Screenshot from 2015-02-21 04:16:29.png

    I am trying to increment cells Edition, Segment, Effective Date.

    When Effective date changes to the next month, Segment should increment by one. If Segment reaches greater than 12, Edition will increment to next letter and Segment will return to 1.

    In the picture, I am only trying to describe what I am achieving, So really, I would only have the Header in A1, B1, C1, then Edition, Segment, Date always in same row when it increments.

    If I could have the Effective date to update on the 20th of each month to the 1st of next month automatically, that would be even better, as it is less prone to user error.

    VBA is okay to use also.

    I hope somone could help me out as I am stumped.
    Last edited by jameswhite4684; 02-20-2015 at 04:28 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    12-28-2014
    Location
    NSW, Australia
    MS-Off Ver
    MS365
    Posts
    604

    Re: increment cells based on date

    Hi James, try this:
    In Cell A11:-
    Please Login or Register  to view this content.
    And in Cell B11:-
    Please Login or Register  to view this content.

    As for the date changing to the next month on the 20th, I think you'll need VBA.
    Unless that date is based on =TODAY()

    In that case maybe:-
    Please Login or Register  to view this content.
    Last edited by Beamernsw; 02-21-2015 at 11:58 AM.

  3. #3
    Registered User
    Join Date
    02-20-2015
    Location
    Seoul, S. Korea
    MS-Off Ver
    Excel
    Posts
    10

    Re: increment cells based on date

    Beamernsw, Thank you for your help!

    I have a question, I am trying to mess with data part, not formula.

    As in my example, If I need it to specify my own Editions and Segments where it needs to start, what part would I exactly change, I guess what I am trying to do is very difficult.

    What I would have is a list of many different Editions, on different Segments, but most will have the effective date the first of the month always. I would acutally have a label in Column A. But I can always tweak cell assignments later.

    Edition Segment Effective
    A 4 03/01/15
    C 10 03/01/15
    NB 4 03/01/15
    N 11 03/01/15
    C 11 03/01/15
    A 12 03/01/15
    B 4 03/01/15

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: increment cells based on date

    James, welcome to the forum

    Please upload a sample of your workbook, not a picture of your data. Pictures are pretty much impossible to edit, and no-one wants to re-type your data for you
    Also, not all members can upload picture files (Company firewalls and stuff)

    Your workbook should show a small desensitized example of the data you are working with and a manual mockup of the expected results.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    02-20-2015
    Location
    Seoul, S. Korea
    MS-Off Ver
    Excel
    Posts
    10

    Re: increment cells based on date

    FDibbins, Thank you for the heads up.

    Attached is an example spreadsheet.
    Attached Files Attached Files

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: increment cells based on date

    Im not sure where you want to put this, but for the Segment increase...
    A
    B
    C
    D
    E
    1
    Edition
    Segment
    Effective
    2
    G
    5
    1 Feb 15
    3
    B
    3
    1 Feb 15
    B
    5
    4
    B
    3
    1 Feb 15
    B
    3
    5
    AZ
    11
    1 Feb 15
    AZ
    3
    6
    N
    11
    1 Feb 15
    N
    11

    D3=IF(E3>12,CHAR(CODE(A3)+1),A3)
    E3=IF(MONTH(C3)=MONTH(C2),B2,B2+1)

    This may have a problem with double letters in column A

  7. #7
    Registered User
    Join Date
    02-20-2015
    Location
    Seoul, S. Korea
    MS-Off Ver
    Excel
    Posts
    10

    Re: increment cells based on date

    It would be the same exact cell, Im trying to make it, so when the effective date changes, segment will increment up to 12 and roll over the edition on 13 and segment resets to 1

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: increment cells based on date

    So you will have values in both A and B that you want to have changed based on a date change? Or do you have a seen value in A and B that you want to base the changes on?

  9. #9
    Registered User
    Join Date
    02-20-2015
    Location
    Seoul, S. Korea
    MS-Off Ver
    Excel
    Posts
    10

    Re: increment cells based on date

    will have values in both A and B that you want to have changed based on a date change I want to say.

    The Value in B will always increase by 1, once per month. The edition / Value A only changes after Value in B exceeds 12 as there are only 12 months in a year.


    or

    If Value C changes, increase Value B +1, at 13 reset to Value B to 1 and increase Value A +1.

    Value C = Date, Value B = Number, Value A= Letter

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: increment cells based on date

    So those values you have in your file are just dummy data?

  11. #11
    Registered User
    Join Date
    02-20-2015
    Location
    Seoul, S. Korea
    MS-Off Ver
    Excel
    Posts
    10

    Re: increment cells based on date

    Yes, but that is acutally how the data is and formatted.

  12. #12
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: increment cells based on date

    Sorry to draw this out

    OK so row 1 will be entered values?
    all else will be formulas?
    If Value C changes, increase Value B +1, at 13 reset to Value B to 1 and increase Value A +1.
    do you want B+1 for any date change, or for every day? meaning, if date changes from Feb 1 to Feb 10 in the next cell (or wont it happen like that?), do you B to increase by 1 or by 0?
    and if it changes from Feb 1 to Apr 10, does it change by 1 or by 2?

  13. #13
    Registered User
    Join Date
    02-20-2015
    Location
    Seoul, S. Korea
    MS-Off Ver
    Excel
    Posts
    10

    Re: increment cells based on date

    it would change from 1 Feb to 1 March every month, once a month, I would like it to change the 20th of Every month. So on 20 Feb it would change Effective date to the next first of the month which would be 1 March 2015.

    I have setup an example: there are four sheets, Sheet one is current month, sheet 2 is what the next month would look like, sheet 3, month after, and sheet 4 just a day after the 20th, as no values should have changed.

    But the values would be as if it was only using one sheet.
    Attached Files Attached Files

  14. #14
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: increment cells based on date

    Assuming your data is all on sheet1...
    A3=IF(B2>=12,CHAR(CODE(A2)+1),A2)
    B3=IF(B2+1>12,1,IF(MONTH(C3)>MONTH(C2),B2+1,B2))
    Both copied down?

  15. #15
    Registered User
    Join Date
    02-20-2015
    Location
    Seoul, S. Korea
    MS-Off Ver
    Excel
    Posts
    10

    Re: increment cells based on date

    Dont assume anything being copied down, as each row with have its own unique data. row 2 will not have anything or maynot have similar data to row 3. That is why the chart you pasted has different data on each row, each is unique to each other.

  16. #16
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: increment cells based on date

    OK, then if you already have data in each cell, you cannot also have a formula in that cell to change its value - cell can have formula OR value, not both

  17. #17
    Registered User
    Join Date
    02-20-2015
    Location
    Seoul, S. Korea
    MS-Off Ver
    Excel
    Posts
    10

    Re: increment cells based on date

    Okay, This may be alot simpler.
    I have a sheet called "Base" this is the starting point for each item.
    I have a sheet called "Monthly" this is where I would like the Segment and Effective date to increase once amonth and only on the 20th of each month.
    Segment will increase +1 and Effective date will increase 1 entire month, so it will always be on the 1st of each new month. I do not want a fill down.

    I believe formulas will only be on the "Monthly" sheet.

    I hope this may be much simplier, as right now I have to many human errors each month when making this work. Editions I am not to worried about as that does not change as often. But if possible I would like also.

    Maybe your formulas will work already cause the senrio is the same, except I added the base values which will be static for the most part.
    Attached Files Attached Files

  18. #18
    Registered User
    Join Date
    02-20-2015
    Location
    Seoul, S. Korea
    MS-Off Ver
    Excel
    Posts
    10

    Re: increment cells based on date

    Here is what a Final look example would look like, as 20th Feb 15 has past.

    I hope this paints a clear picture.
    Attached Files Attached Files

  19. #19
    Valued Forum Contributor
    Join Date
    12-28-2014
    Location
    NSW, Australia
    MS-Off Ver
    MS365
    Posts
    604

    Re: increment cells based on date

    Hi again James, sorry its taken me a bit to get back.
    Not trying to be nasty.....really
    But a common problem with these forums is we don't get the full picture of what the posters wan't in the original post. Thats why a lot of our formulas don't work first time.
    What you want is a fair bit different (well extra) then what you OP states.
    Its all good, but it would have been better for us and you if you got the correct answers 1st time round :D

    I think I have what you want.
    I have a date that would represent TODAY() in cell F1. You can type dates into that cell to test that it does what you want.
    If you are satisfied that it works, you can either replace $F$1 in the D column Formula with TODAY() or you can type =TODAY() into cell F1.
    I had problems with the AK title until I change the Base Effective Date to 1-Dec-14 (Hope thats ok)
    The vlookup is only looking at 30 rows at the moment (rows 2 to 32) you can change that to suit.
    I'm also assuming that Title GA having 6 segments means that 1/7/15 increases Edition and resets segment to 1.


    I hope it does what you want James.

    Beamer
    Attached Files Attached Files

  20. #20
    Valued Forum Contributor
    Join Date
    12-28-2014
    Location
    NSW, Australia
    MS-Off Ver
    MS365
    Posts
    604

    Re: increment cells based on date

    Actually, sorry, I have no idea why I used vlookup. I must be more tired than I thought.
    If Monthly is going to be a direct list from Base then this will be much easier.
    Attached Files Attached Files

+ 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. [SOLVED] Increment a Number in cells of same column based on how many of a specified data is found
    By BeachRock in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-05-2013, 03:13 PM
  2. Replies: 3
    Last Post: 12-14-2011, 08:04 PM
  3. Formula to Increment Value in Cell by One Based on Other Cells
    By laffers in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-18-2011, 01:08 PM
  4. Increment Date based on Worksheet number
    By IamDavidH in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-24-2011, 03:46 PM
  5. [SOLVED] FORMULA TO INCREMENT 25 MONTHS BASED ON A DATE CELL
    By SorianoP in forum Excel General
    Replies: 4
    Last Post: 08-14-2006, 06:50 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