+ Reply to Thread
Results 1 to 22 of 22

coppy 2 collums into one ignoring blanks

  1. #1
    Forum Contributor
    Join Date
    01-28-2013
    Location
    Rugby
    MS-Off Ver
    365
    Posts
    205

    coppy 2 collums into one ignoring blanks

    good afternoon

    I would like to copy 2 columns into 1 ignoring blanks, help with this would be apreciated

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: coppy 2 collums into one ignoring blanks

    See if this helps:

    https://www.excelforum.com/showthread.php?t=1013785
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Contributor
    Join Date
    01-28-2013
    Location
    Rugby
    MS-Off Ver
    365
    Posts
    205

    Re: coppy 2 collums into one ignoring blanks

    hi
    what i need is a bit diferent
    please see below
    column a column b column c
    luis luis luis
    luis luis luis
    luis luis luis
    luis luis luis
    luis luis luis
    luis luis
    luis luis
    luis
    luis
    luis
    luis
    luis
    column c will have everything from column a nad b ignoring the blanks
    any help would be much apreciated
    Last edited by luis6777; 12-27-2014 at 12:20 PM.

  4. #4
    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,025

    Re: coppy 2 collums into one ignoring blanks

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    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

  5. #5
    Forum Contributor
    Join Date
    01-28-2013
    Location
    Rugby
    MS-Off Ver
    365
    Posts
    205

    Re: coppy 2 collums into one ignoring blanks

    Hi

    As per attchement i have colum 1 and colum 2 bough have names and blanks inthe column, i would like to copy the information in that 2 columns to column 3 without any spaces

    Thanks
    Quote Originally Posted by Glenn Kennedy View Post
    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    Attached Files Attached Files

  6. #6
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: coppy 2 collums into one ignoring blanks

    Try this Array Formula which requires confirmation with Ctrl+Shift+Enter instead of just Enter.

    Please Login or Register  to view this content.
    and copy down until you get blank cells.
    Attached Files Attached Files
    Last edited by sktneer; 12-27-2014 at 01:45 PM. Reason: Correct attachment.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  7. #7
    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,025

    Re: coppy 2 collums into one ignoring blanks

    Maybe like this? It's an array formula, which must be confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

    Some of your "blank" cells seemed to contain "something" which resulted in a couiple of gaps in thee data. Once whatever was present, was deleted, this worked perfectly.
    Attached Files Attached Files

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: coppy 2 collums into one ignoring blanks

    OK, it looks like you want to extract the unique items from the separate lists.

    In the sample file the data is "contaminated" with some kind of whitespace character in some of the cells. Were there formulas in the cells that returned blanks and you converted them to values? Also, some of the cells contain trailing space characters.

    On "clean" data this will do what you want.

    Data Range
    B
    C
    D
    E
    F
    G
    H
    I
    3
    Table 1
    Table 2
    Table 3
    4
    ------
    ------
    ------
    ------
    ------
    ------
    ------
    5
    purple
    purple
    purple
    6
    Hibberts Bill
    Gallagher Velita
    Hibberts Bill
    7
    Ross Colin
    8
    Ross Colin
    Roper Jo
    9
    Scrimshire Heather
    10
    Roper Jo
    Smith Craig
    11
    Henry Sharon
    Gallagher Velita
    12
    Shore Susan
    Henry Sharon
    13
    Shore Susan
    14
    Scrimshire Heather
    Truslove Jane
    15
    Smith Craig
    16
    17
    Truslove Jane


    This array formula** entered in H5:

    =IFERROR(IFERROR(INDEX(B$5:B$17,MATCH(0,IF(B$5:B$17<>"",COUNTIF(H$4:H4,B$5:B$17)),0)),INDEX(E$5:E$17,MATCH(0,IF(E$5:E$17<>"",COUNTIF(H$4:H4,E$5:E$17)),0))),"")

    Copy down until you get blanks.

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

  9. #9
    Forum Contributor
    Join Date
    01-28-2013
    Location
    Rugby
    MS-Off Ver
    365
    Posts
    205

    Re: coppy 2 collums into one ignoring blanks

    This is great thanks
    If i would have a 3rd column ie: H how the formula would look like?
    Quote Originally Posted by sktneer View Post
    Try this Array Formula which requires confirmation with Ctrl+Shift+Enter instead of just Enter.

    Please Login or Register  to view this content.
    and copy down until you get blank cells.

  10. #10
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: coppy 2 collums into one ignoring blanks

    Quote Originally Posted by luis6777 View Post
    This is great thanks
    If i would have a 3rd column ie: H how the formula would look like?
    You will need to upload a sample workbook to show your requirement. Also populate the desired output manually.

  11. #11
    Forum Contributor
    Join Date
    01-28-2013
    Location
    Rugby
    MS-Off Ver
    365
    Posts
    205

    Re: coppy 2 collums into one ignoring blanks

    HI

    Will be exacly the same example to you posted on on post 6 but collecting the info from the 3 columns
    Quote Originally Posted by sktneer View Post
    You will need to upload a sample workbook to show your requirement. Also populate the desired output manually.

  12. #12
    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,025

    Re: coppy 2 collums into one ignoring blanks

    Hi. I "borrowed" Tony's solution (it works fine and was easier to adapt) and have added on the criteria for a 3rd column.
    Attached Files Attached Files

  13. #13
    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,025

    Re: coppy 2 collums into one ignoring blanks

    I should remind you that there was "something" in some of your cells that needed to be cleaned before either his solution or mine could work.

  14. #14
    Forum Contributor
    Join Date
    01-28-2013
    Location
    Rugby
    MS-Off Ver
    365
    Posts
    205

    Re: coppy 2 collums into one ignoring blanks

    Perfect

    Thank you
    Quote Originally Posted by Glenn Kennedy View Post
    Hi. I "borrowed" Tony's solution (it works fine and was easier to adapt) and have added on the criteria for a 3rd column.

  15. #15
    Forum Contributor
    Join Date
    01-28-2013
    Location
    Rugby
    MS-Off Ver
    365
    Posts
    205

    Re: coppy 2 collums into one ignoring blanks

    like what?
    i just tryed the formula and it isnt working, the example on post 6 have worked very well do you think that that one could be adapted to 3 columns
    Quote Originally Posted by Glenn Kennedy View Post
    I should remind you that there was "something" in some of your cells that needed to be cleaned before either his solution or mine could work.

  16. #16
    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,025

    Re: coppy 2 collums into one ignoring blanks

    What do you mean by "it isn't working"? That doesn't really tell me very much!! As you can see from the attachment @12, it was working when it left here!!

  17. #17
    Forum Contributor
    Join Date
    01-28-2013
    Location
    Rugby
    MS-Off Ver
    365
    Posts
    205

    Re: coppy 2 collums into one ignoring blanks

    the formula only returns 0 i will be trying it again
    Quote Originally Posted by Glenn Kennedy View Post
    What do you mean by "it isn't working"? That doesn't really tell me very much!! As you can see from the attachment @12, it was working when it left here!!

  18. #18
    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,025

    Re: coppy 2 collums into one ignoring blanks

    Did you remembe rthat it's an array formula ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

  19. #19
    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,025

    Re: coppy 2 collums into one ignoring blanks

    One more thing (I'm away for an hour or so now), what about duplicates - do you want every instance listed, or just list dupes once?

  20. #20
    Forum Contributor
    Join Date
    01-28-2013
    Location
    Rugby
    MS-Off Ver
    365
    Posts
    205

    Re: coppy 2 collums into one ignoring blanks

    HI i have double checked the formula and still returns 0 please see below the formula

    =IFERROR(IFERROR(IFERROR(INDEX(data!AF$6:AF$147,MATCH(0,IF(data!AF$6:AF$147<>"",COUNTIF(C$7:C32,data!AF$6:AF$147)),0)),INDEX(data!AM$6:AM$147,MATCH(0,IF(data!AM$6:AM$147<>"",COUNTIF(C$7:C32,data!AM$6:AM$147)),0))),INDEX(data!$AT$6:$AT$147,MATCH(0,IF(data!$AT$6:$AT$147<>"",COUNTIF(C$7:C32,data!$AT$6:$AT$147)),0))),"")
    Quote Originally Posted by Glenn Kennedy View Post
    Did you remembe rthat it's an array formula ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

  21. #21
    Forum Contributor
    Join Date
    06-24-2005
    Location
    excelliot.com
    MS-Off Ver
    2007
    Posts
    325

    Re: coppy 2 collums into one ignoring blanks

    Try this array formula with C+S+E..

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


    Here data is your range containing data, you need to start this formula from cell F8 drag down..

    Cheers!!

  22. #22
    Forum Contributor
    Join Date
    06-24-2005
    Location
    excelliot.com
    MS-Off Ver
    2007
    Posts
    325

    Re: coppy 2 collums into one ignoring blanks

    If you are ok with duplicates then you can try this formula, this is regular one & not an array one..
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    you can put this formula any where in sheet except cell B2

    Cheers!!

+ 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] copy data from multiple collums into one colum ignoring blanks
    By luis6777 in forum Excel Formulas & Functions
    Replies: 36
    Last Post: 12-27-2014, 01:41 PM
  2. [SOLVED] Ignoring blanks (again)
    By jswainson in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-12-2012, 07:47 AM
  3. [SOLVED] Ignoring blanks
    By jswainson in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-30-2012, 10:28 AM
  4. [SOLVED] Ignoring blanks
    By jswainson in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-09-2012, 02:44 PM
  5. Ignoring blanks
    By exsam21 in forum Excel General
    Replies: 2
    Last Post: 01-18-2006, 01:25 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