+ Reply to Thread
Results 1 to 8 of 8

Take date from string and input into varying column length

  1. #1
    Registered User
    Join Date
    05-14-2013
    Location
    California
    MS-Off Ver
    Excel 2013
    Posts
    78

    Take date from string and input into varying column length

    Book4.xlsx

    Hi everyone, I have a report I could use some help with If anyone is up for it.

    I can't figure out a way to make the column with start date take the date from the merged row, and then input it up until the next merged row. Keep in mind that there are two merged rows grouped together, so it would need to start after the second one.
    Hopefully this could loop down until the end of the table, I've already defined Lastrow in my vba that i use on my real table (cant post that without getting in trouble).

    Thanks for yalls help!

    I have gotten to where if i input the formula =MID(A8,12,10) into the cell the date will show up, but i know this isnt the right way to do it.

    EDIT: there are sometimes merged cells in the middle of the table, with the same start date through them! new attachment

    Also: if you could include comments in your code so i can learn from it i would appreciate it
    Last edited by bruizer31; 06-25-2013 at 05:00 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Take date from string and input into varying column length

    Hello bruizer31,

    Do you want to copy the date from the merge cells down column "B" for each client?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    05-14-2013
    Location
    California
    MS-Off Ver
    Excel 2013
    Posts
    78

    Re: Take date from string and input into varying column length

    Yes, Each client listed under start date #### should get the merged date inputted into column B, until the next start date appears then that would be copied down, and so on.
    Thanks for your help!

  4. #4
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Take date from string and input into varying column length

    Please Login or Register  to view this content.

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Take date from string and input into varying column length

    Hello bruizer31,

    I have added a button at the top of the sheet to run macro. Here is the code. The attached workbook has all the changes already added.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    05-14-2013
    Location
    California
    MS-Off Ver
    Excel 2013
    Posts
    78

    Re: Take date from string and input into varying column length

    Thanks for yall's replies. I tried RCM's response, but ran into an issue where in my actual report, client owner has a ":" in it too, so instead of the date it was inputting the client owners name. Any thoughts on how to correct that?

  7. #7
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Take date from string and input into varying column length

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    05-14-2013
    Location
    California
    MS-Off Ver
    Excel 2013
    Posts
    78

    Re: Take date from string and input into varying column length

    thank you!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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