+ Reply to Thread
Results 1 to 9 of 9

how to find first blank cell in column then copy all preceding cells

Hybrid View

  1. #1
    Registered User
    Join Date
    07-25-2013
    Location
    California, United States
    MS-Off Ver
    Excel 2003
    Posts
    7

    how to find first blank cell in column then copy all preceding cells

    Hi all,

    I am working with arrays that extend far beyond their actual content, and so i am looking for a way, through macros, to find the first blank cell in a column and then copy all preceding cells in that column. Thank you!

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: how to find first blank cell in column then copy all preceding cells

    Try this...

    Range("A1:" & Range("A:A").Find("").Offset(-1).Address).Copy


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    07-25-2013
    Location
    California, United States
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: how to find first blank cell in column then copy all preceding cells

    So the only thing is there are multiple columns in this array and so finding the first blank in the whole array won't necessarily mean finding the first blank in the column that I want, unless I interpreted the code wrongly. Or do you mean that I should replace "A' with index of whichever column I want?

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: how to find first blank cell in column then copy all preceding cells

    Quote Originally Posted by an0593 View Post
    Or do you mean that I should replace "A' with index of whichever column I want?
    Yes replace the A to your desired Column...

  5. #5
    Registered User
    Join Date
    07-25-2013
    Location
    California, United States
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: how to find first blank cell in column then copy all preceding cells

    Is there any way to do the same thing if I don't have the column letter but only have the column number?

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: how to find first blank cell in column then copy all preceding cells

    cells(RowNumber,ColumnNumber)

    So A1 can be written as cells(1,1)

    Range("A:A").Find("")

    can be written as columns(1).Find("")

+ 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] Find empty cell till next value merge or copy the respective cells in next column
    By rpriyadharsini1987 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-25-2013, 03:46 AM
  2. Find the value of the 2nd to last cell in a column that includes blank cells
    By LookIWashed4Supper in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-23-2013, 09:35 PM
  3. [SOLVED] Find first non-blank cell after a group of blanks copy offset cells, find next blank, loop
    By gwsampso in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-21-2012, 06:11 AM
  4. Replies: 9
    Last Post: 12-09-2011, 04:39 AM
  5. find last non blank cell in a column and copy paste in next row
    By prasad_tavva in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-31-2007, 09:41 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