+ Reply to Thread
Results 1 to 13 of 13

Formula to Concatenate data not on same row

  1. #1
    Registered User
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    MS Office Professional 2010
    Posts
    30

    Post Formula to Concatenate data not on same row

    Hi Excel Forum,
    i would like to ask you guys for your help in building a formula to concatenate data that is in 3 different columns and on different rows as well. The way it works is like this, look down column A and if you see something, then look down column B, and if you find something as well, look down column C, and when you find something then concatenate all 3 columns. i dont mind if the formula reads backwards either, for instance, look at column C first and then B then A (searching upwards though, Column A will determine the "break point"). I have attached an example worksheet for reference.

    Please help as it would be greatly appreciated. If this can only be done thru macro please let me know as i will address it to the VBA section instead.

    Thank you.
    Attached Files Attached Files
    Last edited by rubenidas; 06-08-2015 at 08:25 AM. Reason: Changed to "Solved"

  2. #2
    Forum Contributor jayajaya_4's Avatar
    Join Date
    05-09-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    259

    Re: Formula to Concatenate data not on same row

    =concatenate(c6,b4,a2)
    =concatenate(c14,b11,a9)
    =concatenate(c15,b11,a9)

  3. #3
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    HOME: Excel 2007 - WORK: Excel 2013
    Posts
    7,007

    Re: Formula to Concatenate data not on same row

    LOL, I dont think the OP is gonna know what cells the values are in hence the "look down column A" "column B" "column C" etc
    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.

  4. #4
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    HOME: Excel 2007 - WORK: Excel 2013
    Posts
    7,007

    Re: Formula to Concatenate data not on same row

    What decides when to print that data?
    It looks like if the cell in column C is not blank print the previous values of column A and B, is that correct?

  5. #5
    Registered User
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    MS Office Professional 2010
    Posts
    30

    Re: Formula to Concatenate data not on same row

    i need the formula to start at the top then be able to drag it down and make it look for the info. Not me have to name each specific cell out. The list will run down like this for about 200 lines.

  6. #6
    Registered User
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    MS Office Professional 2010
    Posts
    30

    Re: Formula to Concatenate data not on same row

    Quote Originally Posted by Special-K View Post
    What decides when to print that data?
    It looks like if the cell in column C is not blank print the previous values of column A and B, is that correct?
    yes! that is correct.

  7. #7
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    HOME: Excel 2007 - WORK: Excel 2013
    Posts
    7,007

    Re: Formula to Concatenate data not on same row

    Try this
    in C2
    =IF(C2="","",C2&LOOKUP(9.99999999999999E+307,B$1:B2)&LOOKUP(9.99999999999999E+307,A$1:A2))
    and copy down

    Source: http://www.pcreview.co.uk/threads/fi...olumn.1759433/

  8. #8
    Registered User
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    MS Office Professional 2010
    Posts
    30

    Re: Formula to Concatenate data not on same row

    Quote Originally Posted by Special-K View Post
    Try this
    in C2
    =IF(C2="","",C2&LOOKUP(9.99999999999999E+307,B$1:B2)&LOOKUP(9.999999999999999E+307,A$1:A2))
    and copy down

    Source: http://www.pcreview.co.uk/threads/fi...olumn.1759433/
    OMG thank you! i think this works perfect! Can you explain what the 9.9999999E+307 part does??

  9. #9
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    HOME: Excel 2007 - WORK: Excel 2013
    Posts
    7,007

    Re: Formula to Concatenate data not on same row

    I think it finds the last value in the column, but as we are limiting the search from A1 up to the row that we are on it will just find the last value above, ie the previous value depending what row we are on.

  10. #10
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,134

    Re: Formula to Concatenate data not on same row

    An alternate method,

    Try the following array formula in D2,

    ={IF(C2="","",INDEX(C$1:C2,MAX((C$1:C2<>"")*(ROW(C$1:C2))))&INDEX(B$1:B2,MAX((B$1:B2<>"")*(ROW(B$1:B2))))&INDEX(A$1:A2,MAX((A$1:A2<>"")*(ROW(A$1:A2)))))}

    Please note that the formula needs to be confirmed by pressing CTRL+ALT+ENTER (not only ENTER)
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    MS Office Professional 2010
    Posts
    30

    Re: Formula to Concatenate data not on same row

    Ok, one more problem here. I think the report i run puts column A and B into a text format because the data on those two columns comes shifted to the left of the cell since i am pulling the data using the MID formula (i didnt include that because it was company info). Is there a way to not get the N/A or do i have to copy paste and convert each cell to "convert to number" ?

  12. #12
    Registered User
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    MS Office Professional 2010
    Posts
    30

    Re: Formula to Concatenate data not on same row

    Quote Originally Posted by Special-K View Post
    I think it finds the last value in the column, but as we are limiting the search from A1 up to the row that we are on it will just find the last value above, ie the previous value depending what row we are on.
    Ok, one more problem here. I think the report i run puts column A and B into a text format because the data on those two columns comes shifted to the left of the cell since i am pulling the data using the MID formula (i didnt include that because it was company info). Is there a way to not get the N/A or do i have to copy paste and convert each cell to "convert to number" ?

  13. #13
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,134

    Re: Formula to Concatenate data not on same row

    You can prefix an IFERROR condition to get rid of N/As & multiply the MID formula by 1 (1*MID(______)) to auto convert the result into numbers.

+ 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. Replies: 9
    Last Post: 11-19-2014, 04:15 PM
  2. Replies: 4
    Last Post: 04-01-2014, 02:24 AM
  3. [SOLVED] Formula concatenate data in multiple rows based on match data in a different row.
    By kidkool in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-17-2014, 11:01 AM
  4. formula to concatenate cells with data
    By tryer in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-06-2009, 05:43 PM
  5. Keeping the Data, losing the formula (concatenate)
    By arthurz in forum Excel General
    Replies: 3
    Last Post: 02-22-2007, 05:14 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