+ Reply to Thread
Results 1 to 12 of 12

Combine 2 Columns from 2 different sheets with 2 conditions

  1. #1
    Forum Contributor
    Join Date
    02-15-2016
    Location
    India
    MS-Off Ver
    2016
    Posts
    657

    Combine 2 Columns from 2 different sheets with 2 conditions

    Hello Friends

    I need to combine 2 columns from Sheet1 and Sheet2, in both sheets Column C should be combined.

    But if any texts repeated then it should be plotted as is i.e., not removing duplicates.
    But if any numbers repeated then it should be plotted once by removing the duplicate entires.

    i.e., XXX need to keep as without removing duplicates, but number cell duplicates need to be removed.

    Now I had hardcored the expected results in the Sheet3, Column C light yellow cells.

    thanks in advance
    Sekar

  2. #2
    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,209

    Re: Combine 2 Columns from 2 different sheets with 2 conditions

    You have an answer (repeated thread)....?????

    http://www.excelforum.com/showthread...t=#post4565105

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,061

    Re: Combine 2 Columns from 2 different sheets with 2 conditions

    This time it's with two conditions. However, I didn't understand the request the first time round!!!
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Combine 2 Columns from 2 different sheets with 2 conditions

    Hi sekar is any possible to appear the same number in both the sheets (for duplicates)
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  5. #5
    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,209

    Re: Combine 2 Columns from 2 different sheets with 2 conditions

    @glenn,
    Join 2 columns (one after the other), removing duplicate numbers BUT leaving duplicate text ("XXX")

  6. #6
    Forum Contributor
    Join Date
    02-15-2016
    Location
    India
    MS-Off Ver
    2016
    Posts
    657

    Re: Combine 2 Columns from 2 different sheets with 2 conditions

    Yes, Please remove the duplicate numbers (Duplicate Numbers should be displayed as one), and keep the duplicate texts "XXX" as many time which is occured.

  7. #7
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Combine 2 Columns from 2 different sheets with 2 conditions

    E4
    Please Login or Register  to view this content.
    Try this array formula and copy towards down

  8. #8
    Forum Contributor
    Join Date
    02-15-2016
    Location
    India
    MS-Off Ver
    2016
    Posts
    657

    Re: Combine 2 Columns from 2 different sheets with 2 conditions

    Hello Shiva

    Thanks for your formula, I have pasted this array formula to E4 and dragged upto E53, it is working from E17 to E53 i.e., the formula shows blank in E4:E16.


    Thanks again for your formula.

  9. #9
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Combine 2 Columns from 2 different sheets with 2 conditions

    Quote Originally Posted by Sekars View Post
    Hello Shiva

    Thanks for your formula, I have pasted this array formula to E4 and dragged upto E53, it is working from E17 to E53 i.e., the formula shows blank in E4:E16.


    Thanks again for your formula.
    see the attachment

  10. #10
    Forum Contributor
    Join Date
    02-15-2016
    Location
    India
    MS-Off Ver
    2016
    Posts
    657

    Re: Combine 2 Columns from 2 different sheets with 2 conditions

    Hello Siva

    Thanks for this file, But my data is frequently changing and i will add / remove the rows in Column C (and Sl. No. in Column A) in both Sheets. Can we is it possible to change the $C$19, $C$24 and $C$25 to $C$100 like this which including current blank cells may be populated in future.

    Thanks again

  11. #11
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Combine 2 Columns from 2 different sheets with 2 conditions

    Then try this array formula
    =IFERROR(INDEX(Sheet1!C:C,SMALL(IFERROR(IF(IF(Sheet1!$C$4:$C$100="XXX",ROW(Sheet1!$C$4:$C$100),MATCH(Sheet1!$C$4:$C$100,Sheet1!$C:$C,0))-ROW(Sheet1!$C$4:$C$100)=0,ROW(Sheet1!$C$4:$C$100)),""),ROWS(E$4:E4))),IFERROR(INDEX(Sheet2!C:C,SMALL(IF(IF(Sheet2!$C$4:$C$100="XXX",ROW(Sheet2!$C$4:$C$100),IFERROR(MATCH(Sheet2!$C$4:$C$100,Sheet2!$C:$C,0),0))-ROW(Sheet2!$C$4:$C$100)=0,ROW(Sheet2!$C$4:$C$100)),ROWS(E$4:E4)-SUMPRODUCT((FREQUENCY(Sheet1!$C$4:$C$100,Sheet1!$C$4:$C$100)>0)+0)-COUNTIF(Sheet1!$C$4:$C$100,"XXX"))),""))

  12. #12
    Forum Contributor
    Join Date
    02-15-2016
    Location
    India
    MS-Off Ver
    2016
    Posts
    657

    Re: Combine 2 Columns from 2 different sheets with 2 conditions

    Hello Shiva

    Thank you,

    This is my perfect requirement

    Thanks again.

+ 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] Combine 2 Columns from 2 different sheets with 1 condition
    By Sekars in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-21-2017, 09:35 AM
  2. [SOLVED] Combine 2 Columns from 2 different sheets with helper
    By Sekars in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-21-2017, 09:33 AM
  3. [SOLVED] Combine 2 Columns from 2 different sheets with keeping duplicates
    By Sekars in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-20-2017, 03:16 AM
  4. Combine data from multiple sheets with conditions
    By luckyk in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-28-2012, 11:20 AM
  5. Combine data from 2 sheets with different columns
    By mulpuris in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-27-2012, 09:45 AM
  6. combine sheets columns
    By jfish in forum Excel General
    Replies: 6
    Last Post: 11-17-2010, 06:28 PM
  7. How to combine two columns with certain conditions?
    By Islandic in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-02-2009, 09:05 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