+ Reply to Thread
Results 1 to 13 of 13

Copy a column of data excluding blank cells to consolodate

  1. #1
    Forum Contributor
    Join Date
    06-10-2014
    Location
    UK
    MS-Off Ver
    2010
    Posts
    272

    Copy a column of data excluding blank cells to consolodate

    How do you go about copying a column of cells via a formula to another sheet without any included blank (empty ) cells to the receiving destination ?

  2. #2
    Registered User
    Join Date
    12-05-2012
    Location
    USA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    31

    Re: Copy a column of data excluding blank cells to consolodate

    You might try a macro.

    Please Login or Register  to view this content.
    If this answers your question, please mark your thread as Solved by selecting Thread Tools ( above your first post) and mark thread as Solved .
    Please check the Add Reputation link.

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

    Re: Copy a column of data excluding blank cells to consolodate

    Try this...

    Data Range
    A
    B
    C
    1
    Data
    -----
    Data
    2
    1
    1
    3
    2
    2
    4
    3
    3
    5
    4
    4
    6
    5
    7
    5
    6
    8
    6
    7
    9
    7
    8
    10
    9
    11
    8
    10
    12
    13
    14
    9
    15
    10


    This array formula** entered in B2:

    =IFERROR(INDEX(A:A,SMALL(IF(A$2:A$15<>"",ROW(A$2:A$15)),ROWS(C$2:C2))),"")

    ** 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.

    Copy down until you get blanks.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Forum Contributor
    Join Date
    06-10-2014
    Location
    UK
    MS-Off Ver
    2010
    Posts
    272

    Re: Copy a column of data excluding blank cells to consolodate

    Thanks for the reply.

    Yes you could use a macro, but that's not the route I want to take. a solution via a formula would be ideal.

    in your macro should SkipBlanks _:=False, not be SkipBlanks _:=True, ?

  5. #5
    Registered User
    Join Date
    12-05-2012
    Location
    USA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    31

    Re: Copy a column of data excluding blank cells to consolodate

    OK.
    Thanks, but I ran the macro and it works.
    It is "Transpose:=False"

  6. #6
    Forum Contributor
    Join Date
    06-10-2014
    Location
    UK
    MS-Off Ver
    2010
    Posts
    272

    Re: Copy a column of data excluding blank cells to consolodate

    Hi Tony,
    Thanks for trying to help.
    this is the formula I'm using based on your, it's not returning any values. I am entering using CSE for an array formula. Any ideas ?

    =IFERROR(INDEX('Production'!I:'Production'!I,SMALL(IF('Production'!I$4:'Production'!I$262<>"",ROW('Production'!I$4:'Production'!I$262)),ROWS('Stocks'!P$20:P20))),"")

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

    Re: Copy a column of data excluding blank cells to consolodate

    I'm assuming you're entering the formula on sheet Stocks in cell P20.

    You don't need to repeat the sheet names when referencing a range. Try it like this:

    =IFERROR(INDEX(Production!I:I,SMALL(IF(Production!I$4:I$262<>"",ROW(Production!I$4:I$262)),ROWS(P$20:P20))),"")

    Still array entered.

  8. #8
    Forum Contributor
    Join Date
    06-10-2014
    Location
    UK
    MS-Off Ver
    2010
    Posts
    272

    Re: Copy a column of data excluding blank cells to consolodate

    Still nothing. this is a sample of the data layout.

    7 May 2015

    12 May 2015

    17 May 2015



    22 May 2015

    27 May 2015





    1 June 2015



    6 June 2015

  9. #9
    Forum Contributor
    Join Date
    06-10-2014
    Location
    UK
    MS-Off Ver
    2010
    Posts
    272

    Re: Copy a column of data excluding blank cells to consolodate

    Tony,

    it's working just fine, my fat fingers !
    Thank you very much for you help.

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

    Re: Copy a column of data excluding blank cells to consolodate

    Here's a sample file...
    Attached Files Attached Files

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

    Re: Copy a column of data excluding blank cells to consolodate

    Good deal. Thanks for the feedback!

    If your question has been solved please mark the thread as being solved.

    In the menu bar above the very first post select Thread Tools, then select Mark this thread as solved.

  12. #12
    Registered User
    Join Date
    05-04-2020
    Location
    Calgary
    MS-Off Ver
    2016
    Posts
    1

    Re: Copy a column of data excluding blank cells to consolodate

    I have a relatively similar task. I have tried the above formula as an array and another almost identical one but with the added parameter of ISTEXT included. Each one pulls about 1/2 the data. All the values appear in one list or the other with no duplicates. I have carefully made formatted all cells to be currencies. Not sure what is going on.

  13. #13
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Copy a column of data excluding blank cells to consolodate

    Quote Originally Posted by Craig Viau View Post
    I have a relatively similar task. I have tried the above formula as an array and another almost identical one but with the added parameter of ISTEXT included. Each one pulls about 1/2 the data. All the values appear in one list or the other with no duplicates. I have carefully made formatted all cells to be currencies. Not sure what is going on.
    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. Autofill excel column excluding blank cells
    By manajid in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-02-2013, 02:43 AM
  2. Autofill excel column excluding blank cells
    By manajid in forum Excel General
    Replies: 4
    Last Post: 04-01-2013, 06:53 AM
  3. Excluding blank cells from a range of data
    By Consty1 in forum Excel General
    Replies: 5
    Last Post: 10-11-2012, 03:19 PM
  4. Replies: 4
    Last Post: 07-25-2011, 02:18 PM
  5. Sorting data excluding blank cells
    By jpruffle in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-23-2008, 11:09 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