+ Reply to Thread
Results 1 to 6 of 6

Merging col items in a single cell for each row item

  1. #1
    Registered User
    Join Date
    10-10-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    48

    Merging col items in a single cell for each row item

    Hello,

    Hope you are doing fine.

    I have an example for which i would require a macro to solve, attaching the example file for your reference.

    There are prod. plant codes in Col A and in row 1 we have 12 products codes. For each plant code if we find matched products then we are suppose to merge the product codes in a single cell next to Plant code. it'll clear when you see the attached excel file.

    Regards,
    Rajkumar
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,618

    Re: Merging col items in a single cell for each row item

    Put this function in a standard code module

    Please Login or Register  to view this content.
    Put this formula in Q2 and copy down

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

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

    Re: Merging col items in a single cell for each row item

    Check your data.

    In row 12, D12 and I12 both say Matched (against 01CV and 01LA) but the result in Q12 only says 01CV ?
    Q14 says 01BV but B14 (01BV) says Not matched. D14 (01CV) is in fact matched but theres no reference to this in Q14 ?
    B15 Says Matched for 01BV but Q15 says 01FC which is not matched in that row ?
    Row 16 is a complete mess, 01CV 01FF 01HT 01NW 01SL are all matched yet Q16 only has 01LA which is not matched at all ?
    Row 17 check D17 and Q17 result
    Row 18 check the Matched against Q18 results
    Row 19 check it
    Row 20 check it also
    Row 21 again check this
    Row 22 wrong again check it
    Row 23 check it
    Row 24 ....HOORAY! WE HAVE A WINNER, ITS FRIGGING CORRECT!!
    Row 25 Here we go again, its wrong
    Row 26 Not sure what you done here, check it
    Row 27 wrong again
    Row 28 ...WHY NOT END ON A CORRECT ROW! Thank god!

    Why do we have to check people's data on this forum before solving a problem?
    It should be correct in the first place!!
    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
    Registered User
    Join Date
    10-10-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    48

    Re: Merging col items in a single cell for each row item

    Thanks Alpha Its working great. Can i ask you instead of Function can you help with using Array vba coding.

  5. #5
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,618

    Re: Merging col items in a single cell for each row item

    Quote Originally Posted by Rajkumar_h View Post
    Thanks Alpha Its working great. Can i ask you instead of Function can you help with using Array vba coding.
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    10-10-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    48

    Re: Merging col items in a single cell for each row item

    Thanks Alpha, This is what I was looking for and works very fine.

+ 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. Pick multiple items from list and sort alphabetically in single cell
    By kawale in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-07-2021, 01:48 PM
  2. [SOLVED] Items in a single cell need to be tallied
    By Habanero Time in forum Excel General
    Replies: 6
    Last Post: 08-25-2015, 04:18 AM
  3. Merging multiple cells into a single cell with comma
    By faizaan316 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-03-2013, 04:04 PM
  4. Replies: 0
    Last Post: 11-13-2012, 12:53 PM
  5. evaluating one of two items in a single cell
    By mrw111 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-06-2010, 10:08 AM
  6. Merging a full column into a single cell
    By Gmoney in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-15-2006, 07:37 PM
  7. [SOLVED] merging data to a single cell
    By robbiemc in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-09-2006, 05:40 PM

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