+ Reply to Thread
Results 1 to 5 of 5

Merge multiple columns into a single column with condition

  1. #1
    Registered User
    Join Date
    11-28-2014
    Location
    india
    MS-Off Ver
    7
    Posts
    141

    Merge multiple columns into a single column with condition

    Hi all need a help on How to in Excel
    I want to merge the comment of ( B4, D4, F4, H4, J4, L4 ) in “N4” and ( C4,E4,G4,I4,K4,M4 ) data in “O4” but the condition is, in N1 & O1 it should be marge as multiple lines in one cell with the same header. (For example please check in attached excel) if any header’s comment reflecting as blank in that scenario the header should reflect but without any comment ( WO & QC coming up with blank comment in N4 and O4).

    Arin.xlsx

    I have tried with the below formula
    In N4 formula “=B4&CHAR(10)&D4&CHAR(10)&F4&CHAR(10)&H4&CHAR(10)&J4&CHAR(10)&L4”
    In O4 formula “=C4&CHAR(10)&E4&CHAR(10)&G4&CHAR(10)&I4&CHAR(10)&K4&CHAR(10)&M4”

    But with this it is not picking with the header. As in N4 and O4
    How to pull the data with the appropriate header. As in N5 and O5

    It will be a great help if anyone can help me out

    Regards
    Arindam
    Attached Files Attached Files

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Merge multiple columns into a single column with condition

    Try this in N4:

    =$B$2&":-"&B4&CHAR(10)&$D$2&":-"&D4&CHAR(10)&$F$2&":-"&F4&CHAR(10)&$H$2&":-"&H4&CHAR(10)&$J$2&":-"&J4&CHAR(10)&$L$2&":-"&L4

    Drag the formula to O4 and then down as far as needed.

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,210

    Re: Merge multiple columns into a single column with condition

    Your formulae do not reference the headers in row 2 so they are not shown

    You need ..

    =$B$2 & ":-" &B4&CHAR(10)&$D$2 & ":-" &D4&CHAR(10)&$F$2 & ":-" &F4&CHAR(10)&$H$2 & ":-" &H4&CHAR(10)&$J$2 & ":-" &J4&CHAR(10)&L4

  4. #4
    Registered User
    Join Date
    11-28-2014
    Location
    india
    MS-Off Ver
    7
    Posts
    141

    Re: Merge multiple columns into a single column with condition

    Thanks to both of you

  5. #5
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Merge multiple columns into a single column with condition

    You're welcome, glad we could help.

+ 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. [SOLVED] Merge multiple columns into single column based on ID
    By sqlnoob in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-28-2016, 01:22 PM
  2. Merge specific column data from multiple sheets in single column of new workbook.
    By kadam203 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-14-2016, 01:58 AM
  3. Merge values in a single cell based on condition
    By bajrang2101 in forum Excel General
    Replies: 3
    Last Post: 12-09-2014, 06:45 AM
  4. Merge Multy Columns in Single column with data
    By sharma4845 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-22-2014, 05:02 AM
  5. Merge Multy Columns in Single column with data
    By sharma4845 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-22-2014, 05:00 AM
  6. Replies: 4
    Last Post: 05-31-2012, 07:27 PM
  7. [SOLVED] merge data from multiple columns to single column
    By triggerthehorse in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-17-2005, 04:06 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