+ Reply to Thread
Results 1 to 3 of 3

Copy values from populated cells only, and identify those cell locations.

  1. #1
    Registered User
    Join Date
    10-18-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003
    Posts
    10

    Copy values from populated cells only, and identify those cell locations.

    Hi Everyone - I am new to this forum, and just starting to get my feet wet with VBA. A pleasure to join you here.

    Here's my problem:

    On Sheet 1, in Column A, the cells contain numbers, text and blanks, in no particlar order. I am trying to write a macro that will copy the contents of populated cells only, ignoring the blank cells. The contents of the populated cells need to be copied to another sheet (Sheet 2), and must appear in the same order (vertically), while ignoring/removing blank cells in the column. Essentially, I want to copy Column A from Sheet 1 to Sheet 2, but remove blank cells in the process.
    At the same time, I need to identify the address of each cell that is populated on Sheet 1, and show each address in Column D on Sheet 3, in consecutive cells (again, no blanks).

    Also note, the number of rows is not always the same...can be 30 rows, or 1000 rows, depending on the amount of data available.


    This is above my current abilities , but I am confident that someone here can help.
    Thanks All.

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Copy values from populated cells only, and identify those cell locations.

    hi The Machinist, welcome to Excelforum, option, please check attachment, press Run button
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    10-18-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Copy values from populated cells only, and identify those cell locations.

    Thanks watersev! That works perfectly! Simple and elegant code. Much appreciated.
    Cheers!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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