+ Reply to Thread
Results 1 to 4 of 4

Combining cells from Sheet A to sheet B (split up text)

  1. #1
    Registered User
    Join Date
    09-01-2023
    Location
    Sweden
    MS-Off Ver
    MS365 (16.76)
    Posts
    11

    Question Combining cells from Sheet A to sheet B (split up text)

    Hi, I have a problem you might be able to help me with,

    I have a master document in Excel with people joining for an event, All 500 guests have their single row vertically, and each person has a first name, last name, email, etc. in each column.
    So far so good, my guests have chosen a couple of activities on a signup page and when I export that summary in Excel (document b) I get the summary first name, last name, and email activity1 each on its separate row.
    This means that because each guest can choose up to 4 activities (they don't have to choose 4, but its minimum of 1 activity), because of that the list is huge with information and rows.

    Is it possible to have the activities synced over from document b to my Master document and be displayed in new columns for example Activity 1, Activity 2, Activity 3, or Activity 4 in the same row for that individual person?

    Se my example documents attached, the names are just made up in the example

    Thank you so much for the help!
    Attached Files Attached Files
    Last edited by j.88; 09-12-2023 at 01:29 AM.

  2. #2
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365 Version 2404
    Posts
    1,259

    Re: Combining cells from Sheet A to sheet B

    Hi. Welcome to the forum.

    I copied sheet B into a new tab in Sheet A and renamed it DocumentB, just to make it easier.
    Then I use this formula in cell D2 and drag it across and down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    You can use the formula changing the references to a different workbook, but probably both workbooks must be open so the formula works.

    Please check wb attached and let us know how it goes.

    Good luck!
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    09-01-2023
    Location
    Sweden
    MS-Off Ver
    MS365 (16.76)
    Posts
    11

    Re: Combining cells from Sheet A to sheet B

    Wow that is unbelievable! I'm very impressed!!

    I have during the weekend had a new look at the code and got it to work, if you could please explain the code more in-depth I would be so happy.

    Thank you very much!
    Last edited by j.88; 09-04-2023 at 09:02 AM.

  4. #4
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365 Version 2404
    Posts
    1,259

    Re: Combining cells from Sheet A to sheet B

    Hello, j.88. Sorry for the delay.

    The INDEX function here will find a value, according to specified column and row, in this case it is only one column (F), so only the row is to be found. That job is taken care of by the AGGREGATE, ROW and COLUMNS functions combined.
    In the formula bar, if you select the argument ROW($A$1:$A$1000)/(DocumentB!$C$1:$C$1000=$C2) and press key F9, you'll see a list with several error values and the numbers 2, 3, 4, indicating that the relevant values are in those rows.

    As the subfunction SMALL is selected in the AGGREGATE function (No. 15), that subfunction finds the Nth small value in the array created with that argument above (ROW($A$1:$A$1000)/(DocumentB!$C$1:$C$1000=$C2)), ignoring error values (2nd argument in the AGGREGATE function (No. 6)).

    COLUMNS($A$1:A$1) is k, the last argument in the AGGREGATE function and returns 1, i.e., the first small, or smallest relevant value, in this case row 2. As you drag the formula across, this k becomes COLUMNS($A$1:B$1) and returns 2, the second relevant value, in this case row 3, and so on.
    When you drag to formula down, it will refer to the second relevant value, that is, the second e-mail.

    I hope this helps you clarify how the formula works.

    Thank you for the feedback and for the reputation added.

    Have a blessed day.

+ 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. Help combining calendar sheet with gannt chart sheet
    By rlgiegerich in forum Excel General
    Replies: 0
    Last Post: 03-25-2021, 01:19 PM
  2. Combining a group of cells in 1 worksheet into a single cell in another sheet
    By plantagenet in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-15-2016, 08:33 AM
  3. Replies: 2
    Last Post: 07-30-2015, 11:43 AM
  4. [SOLVED] Combining snippets of VBA to create new sheet and add formatted cells to another page.
    By Mr_Bill in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-13-2014, 06:54 PM
  5. possibility to look up two combining cells from another sheet?
    By chilli76 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-07-2014, 03:09 PM
  6. Replies: 4
    Last Post: 02-23-2012, 04:21 AM
  7. Replies: 4
    Last Post: 02-22-2006, 05:20 AM

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