+ Reply to Thread
Results 1 to 12 of 12

gather 6 columns based on row

  1. #1
    Forum Contributor
    Join Date
    01-18-2016
    Location
    OBX NC
    MS-Off Ver
    Office 2013
    Posts
    153

    gather 6 columns based on row

    I have a excel sheet that has 2 pages.
    Sheet1 W76 has a date
    Sheet 2 is situated like: column a = date, column d:i are 6 numbers (that I need)

    I want to place these #'s - values (Sheet 2- D:I)on sheet 1 in a single cell( with comma and space) in v76, if date from sheet 1 matches sheet2 (A:A)

    Any ideas...?

    Thanks,Jack

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: gather 6 columns based on row

    Will there ALWAYS be 6 numbers, ie are ALL the values in columns D:I filled in?
    If not you're gonna end up with something like 1, 2, , 4, 5, 6 or 13, 27, 71, , , which you're bound to say you dont want., hence the question.
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Contributor
    Join Date
    01-18-2016
    Location
    OBX NC
    MS-Off Ver
    Office 2013
    Posts
    153

    Re: gather 6 columns based on row

    there will ALWAYS be # based off date on sheet 1 w76
    thanks for your assistance!

  4. #4
    Forum Contributor
    Join Date
    01-18-2016
    Location
    OBX NC
    MS-Off Ver
    Office 2013
    Posts
    153

    Re: gather 6 columns based on row

    Sheet 2 never contains duplicate dates........Dont know if this helps?

  5. #5
    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: gather 6 columns based on row

    To best describe or illustrate your problem you would be better off attaching a dummy workbook. The workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    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

  6. #6
    Forum Contributor
    Join Date
    01-18-2016
    Location
    OBX NC
    MS-Off Ver
    Office 2013
    Posts
    153

    Re: gather 6 columns based on row

    Quote Originally Posted by Special-K View Post
    Will there ALWAYS be 6 numbers, ie are ALL the values in columns D:I filled in?
    If not you're gonna end up with something like 1, 2, , 4, 5, 6 or 13, 27, 71, , , which you're bound to say you dont want., hence the question.
    Yes data will always be filled in for D:I if a: contains date.....

  7. #7
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: gather 6 columns based on row

    Try this with a helper column in Sheet2 (I use the column J)
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    After that use the following formula in Sheet1!W76
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  8. #8
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: gather 6 columns based on row

    Quote Originally Posted by jackf-nc View Post
    Yes data will always be filled in for D:I if a: contains date.....
    A sample would help establish the most suitable method.

    =TEXT(SUMPRODUCT(INDEX(Sheet2!D:I,MATCH(Sheet1!V76,Sheet2!A:A,0),0)*10^{5,4,3,2,1,0}),"0\,0\,0\,0\,0\,0")

    Would work with single digit integers, without the need for the extra column that Jose has used, but is not suitable for decimals or an unknown number of digits.

  9. #9
    Forum Contributor
    Join Date
    01-18-2016
    Location
    OBX NC
    MS-Off Ver
    Office 2013
    Posts
    153

    Re: gather 6 columns based on row

    Thank you so much guys.... I was unable to get either solution to work. I have made a dummy sheet for you to see what I am trying to do. Thanks again for your assistance.
    Attached Files Attached Files

  10. #10
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: gather 6 columns based on row

    My suggestion is no good for your example, but Jose's works fine.

    Enter the first formula from post #7 into J1 on Sheet2, then copy it down to the other rows.

    Enter the second formula into V76 of sheet1, note that Jose had a typo in the second formula, Sheet1!V76 should actually be Sheet1!W76

  11. #11
    Forum Contributor
    Join Date
    01-18-2016
    Location
    OBX NC
    MS-Off Ver
    Office 2013
    Posts
    153

    Re: gather 6 columns based on row

    I think i got part of it to work, using Jose's method - instead of using helper on sheet 2 I simply created array over existing data. Do I really need a helper on sheet 2?

    =INDEX(Sheet2!D1:I500,MATCH(W$76,Sheet2!A1:A500,0),1)

    It does display first cell - D4(25), but how do i share complete array (25,48, 51, 65, 72, 4) - actually thats how i want it shown in cell w76 on sheet one. Am i going to to have create a separate index for each number?
    Thanks again...

  12. #12
    Forum Contributor
    Join Date
    01-18-2016
    Location
    OBX NC
    MS-Off Ver
    Office 2013
    Posts
    153

    Re: gather 6 columns based on row

    I can get all to work using:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    But it seems that there is a cleaner method, than this? Is there? Any suggestions?

+ 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. Forumla to gather data from one sheet based on input of another sheet.
    By GraysonRobbins in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-24-2016, 05:21 PM
  2. Gather data based on date and collate into a weekly total
    By Issy.87 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-15-2015, 08:02 PM
  3. How to gather yes/no data from columns to a single cell?
    By rio- in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-02-2015, 04:07 AM
  4. Replies: 18
    Last Post: 03-18-2014, 03:29 PM
  5. Gather data based on two conditions from two different sheets
    By nguerra in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-02-2013, 04:09 AM
  6. [SOLVED] Search for items in different columns and gather their price as a result
    By paokun in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-03-2013, 01:13 AM
  7. Replies: 0
    Last Post: 07-27-2011, 01:00 AM

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