+ Reply to Thread
Results 1 to 31 of 31

Combine data from multiple cells if another cell contains...

  1. #1
    Registered User
    Join Date
    02-15-2021
    Location
    Columbia, SC
    MS-Off Ver
    M365 Business
    Posts
    25

    Combine data from multiple cells if another cell contains...

    Hello,

    I am trying to sync a table's data with a timeline I am building.

    Attached is an Example doc for what i'm trying to accomplish.

    My goal is to take the data from the left table and sync it with the timeline. The hope is that I only have to modify data in the table, hit a button, and all of that data will correspond to the timeline with color coordination and spacing based on what quarter it is.

    Is this wishful thinking, or is there a way to accomplish this?

    Thanks for the insight!
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Combine data from multiple cells if another cell contains...

    Hi

    I don't understand what you mean by sync to the timeline.

    Please explain for each of the cells in the timeline what rule you have applied to place them in their particular cells.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    02-15-2021
    Location
    Columbia, SC
    MS-Off Ver
    M365 Business
    Posts
    25

    Re: Combine data from multiple cells if another cell contains...

    I currently don't have any rules setup. That was all manual input.

    I'll draw and explain.
    Screenshot 2021-03-12 122809.jpg

    I want the data to be able to combine into a single cell. Might end up just doing it based on individual cells. Will look similar anyways.

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Combine data from multiple cells if another cell contains...

    Please Login or Register  to view this content.
    Last edited by sintek; 03-15-2021 at 09:23 AM.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  5. #5
    Registered User
    Join Date
    02-15-2021
    Location
    Columbia, SC
    MS-Off Ver
    M365 Business
    Posts
    25

    Re: Combine data from multiple cells if another cell contains...

    Quote Originally Posted by sintek View Post
    Please Login or Register  to view this content.
    sintek, would you mind explaining to me what this is doing?

  6. #6
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Combine data from multiple cells if another cell contains...

    would you mind explaining to me what this is doing
    This is providing you with a result...Does it not work?

  7. #7
    Registered User
    Join Date
    02-15-2021
    Location
    Columbia, SC
    MS-Off Ver
    M365 Business
    Posts
    25

    Re: Combine data from multiple cells if another cell contains...

    Quote Originally Posted by sintek View Post
    This is providing you with a result...Does it not work?
    It actually worked like magic. I would just like to learn how you learned to do that. Lol

  8. #8
    Registered User
    Join Date
    02-15-2021
    Location
    Columbia, SC
    MS-Off Ver
    M365 Business
    Posts
    25

    Re: Combine data from multiple cells if another cell contains...

    Quote Originally Posted by sintek View Post
    This is providing you with a result...Does it not work?
    Screenshot 2021-03-15 092103.png

    Actually, after testing, that works perfectly other than the fact that it will continue to grow if you run the macro more than once. Can you please add an argument to erase the existing data before running again? Would be best if it only inputs data if changes were made or new things were added.

    Btw, kudos to you. This is awesome.

  9. #9
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Combine data from multiple cells if another cell contains...

    Oh...Slow today I am lol...See amended code above with notes...
    Edit...
    add an argument to erase the existing data before running again?
    See below...red snippet

    Please Login or Register  to view this content.
    Last edited by sintek; 03-15-2021 at 09:31 AM.

  10. #10
    Registered User
    Join Date
    02-15-2021
    Location
    Columbia, SC
    MS-Off Ver
    M365 Business
    Posts
    25

    Re: Combine data from multiple cells if another cell contains...

    Quote Originally Posted by sintek View Post
    Oh...Slow today I am lol...See amended code above with notes...
    Edit...

    See below...red snippet

    Please Login or Register  to view this content.
    Would it start to get too complicated if I were to move the 2021:2026+ Long term columns to a second sheet? And the data still be able to move properly?

  11. #11
    Registered User
    Join Date
    02-15-2021
    Location
    Columbia, SC
    MS-Off Ver
    M365 Business
    Posts
    25

    Re: Combine data from multiple cells if another cell contains...

    I know I am asking a lot, but you are so good at this and are helping me out A TON.

  12. #12
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Combine data from multiple cells if another cell contains...

    Robert5042,

    If the list of years from G2 grows and it is sorted in ascending order.
    Please Login or Register  to view this content.

  13. #13
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Combine data from multiple cells if another cell contains...

    Would it start to get too complicated if I were to move the 2021:2026+ Long term columns to a second sheet?
    Nope...
    Please Login or Register  to view this content.
    Just a heads up...No need to quote entire posts...Just clutters thread...
    Last edited by sintek; 03-15-2021 at 10:20 AM.

  14. #14
    Registered User
    Join Date
    02-15-2021
    Location
    Columbia, SC
    MS-Off Ver
    M365 Business
    Posts
    25

    Re: Combine data from multiple cells if another cell contains...

    2 more additions if possible:
    1. What would I need to change for it to start whereever I move the 2021? For example if I didn't want it to start at A1, but rather somewhere like B9.
    2. Is there something that you can add to ensure it doesn't remove all rows beneath it? I may end up putting more data beneath it and want to ensure it doesn't get erased.

    Thanks for all of your help!

  15. #15
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Combine data from multiple cells if another cell contains...

    For the above...can you please upload a sample depicting this supposed setup...

  16. #16
    Registered User
    Join Date
    02-15-2021
    Location
    Columbia, SC
    MS-Off Ver
    M365 Business
    Posts
    25

    Re: Combine data from multiple cells if another cell contains...

    I explained in the excel file. Let me know if you have any questions. I may not have explained it well.
    Attached Files Attached Files
    Last edited by Robert5042; 03-17-2021 at 08:05 AM.

  17. #17
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Combine data from multiple cells if another cell contains...

    You are not being transparent with Roadmap setup...
    Code needs to suite requirement...
    Does it look like this in attached?...
    If not, please upload a file with actual setup...
    Attached Files Attached Files

  18. #18
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Combine data from multiple cells if another cell contains...

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by jindon; 03-17-2021 at 10:55 AM. Reason: Fixed a typo

  19. #19
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Combine data from multiple cells if another cell contains...

    If setup is as per post 17 file then this should work...
    Please Login or Register  to view this content.
    Last edited by sintek; 03-17-2021 at 11:01 AM.

  20. #20
    Registered User
    Join Date
    02-15-2021
    Location
    Columbia, SC
    MS-Off Ver
    M365 Business
    Posts
    25

    Re: Combine data from multiple cells if another cell contains...

    Both of you gents are Gods. Works perfectly. That should be good for now. I will "beautify" it as I stated and will let you know if I run into any issues. Thanks.

  21. #21
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Combine data from multiple cells if another cell contains...

    only one GOD...J3v16

  22. #22
    Registered User
    Join Date
    02-15-2021
    Location
    Columbia, SC
    MS-Off Ver
    M365 Business
    Posts
    25

    Exclamation Re: Combine data from multiple cells if another cell contains...

    Ran into an issue. See attached and check sheet "Roadmap" and view row F.
    Attached Files Attached Files

  23. #23
    Registered User
    Join Date
    02-15-2021
    Location
    Columbia, SC
    MS-Off Ver
    M365 Business
    Posts
    25

    Re: Combine data from multiple cells if another cell contains...

    I actually was able to fix it myself!! Changed the "yrFnd.Column + 5" to Yr.Fnd.Column" + 10+

  24. #24
    Registered User
    Join Date
    02-15-2021
    Location
    Columbia, SC
    MS-Off Ver
    M365 Business
    Posts
    25

    Re: Combine data from multiple cells if another cell contains...

    On sheet "Roadmap", is there a string of code that I can use to add the year to the last column only, "2026+ (Long Term)"?

    Format:
    "Year | Qtr: Solution - Budget"
    Last edited by Robert5042; 03-17-2021 at 02:28 PM.

  25. #25
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Combine data from multiple cells if another cell contains...

    Don't quite understand?

    Need to be more specific...Header to change...or in every cell of last column or ????
    Last edited by sintek; 03-17-2021 at 02:45 PM.

  26. #26
    Registered User
    Join Date
    02-15-2021
    Location
    Columbia, SC
    MS-Off Ver
    M365 Business
    Posts
    25

    Re: Combine data from multiple cells if another cell contains...

    Currently, after running the macro it will move the data with the format, "Qtr: Solution - Budget".

    However, for the last column, "2026+ (Long Term)" I would like it to have the year with it as well. With the format "Year | Qtr: Solution - Budget"

    See attached
    Attached Files Attached Files

  27. #27
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Combine data from multiple cells if another cell contains...

    See attached...Tx for rep +
    Attached Files Attached Files

  28. #28
    Registered User
    Join Date
    02-15-2021
    Location
    Columbia, SC
    MS-Off Ver
    M365 Business
    Posts
    25

    Re: Combine data from multiple cells if another cell contains...

    That worked. Now for the fun part... what if I want data to go below the input?

    See file
    Attached Files Attached Files

  29. #29
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Combine data from multiple cells if another cell contains...

    Nope...Now you just opening a whole can of worms...That is just bad template setup...
    Unless your calendar setup is set within a specific range which limits to specific data entry..
    As is, data within the specific columns are growing...which means one will have to insert shift down when entering data...this will miss-align all the below rows...

    I am not prepared to assist with this...The initial query has been solved...

  30. #30
    Registered User
    Join Date
    02-15-2021
    Location
    Columbia, SC
    MS-Off Ver
    M365 Business
    Posts
    25

    Re: Combine data from multiple cells if another cell contains...

    No worries. I understand. I'm very new to VBA so I am unaware of its limitations. I appreciate your help. Marking this thread as solved!

  31. #31
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Combine data from multiple cells if another cell contains...

    I am unaware of its limitations.
    Your request is not a limitation...Just bad structuring of data...

+ 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. How to combine text from multiple cells into one cell?
    By Keegan1116 in forum Excel General
    Replies: 3
    Last Post: 10-17-2020, 05:55 PM
  2. [SOLVED] Combine Hi/Lo data from Multiple cells into one cell
    By StreekyD in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-18-2017, 01:04 AM
  3. [SOLVED] Combine multiple cells text into one cell, skip blank cells.
    By T15K in forum Excel General
    Replies: 6
    Last Post: 12-05-2014, 09:49 PM
  4. How to combine content of multiple cells into one cell
    By friend11_6 in forum Excel General
    Replies: 3
    Last Post: 07-10-2009, 11:25 AM
  5. combine data from multiple cells
    By spanic in forum Excel General
    Replies: 4
    Last Post: 12-11-2008, 06:11 PM
  6. [SOLVED] How do I combine the contents of multiple cells in one cell?
    By Debbie in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-16-2005, 07:10 PM
  7. [SOLVED] Combine multiple cells into one cell range.
    By grady88 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-12-2005, 03:05 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