+ Reply to Thread
Results 1 to 3 of 3

Copy a cell to another cell and continue up to empty cell

  1. #1
    Registered User
    Join Date
    11-01-2004
    Posts
    37

    Copy a cell to another cell and continue up to empty cell

    Hi Guys

    Is there anybody to help me?
    I need a macro to distinguish whether cell A1 is not empty and then copy it to B1 and continue it (A2 to B2) up to Ai which is the empty cell.

    Tanks
    HME

  2. #2
    Registered User
    Join Date
    11-01-2004
    Posts
    37

    sense empty cell

    hi
    No answer?

    I nee it, Please somebody help I can not work with:IF,End If,For,Next properly.I need a macro to distinguish Ai is not empty (i=1 to next i) and copy Ai to Bi up to empty Ai.

    thanks a lot
    hme

  3. #3
    Registered User
    Join Date
    01-30-2005
    Posts
    6

    Copy a cell to another cell

    I'm really just a beginner, but the following code seems to work for your problem:

    Sub helpfulcode
    Dim cell As Range, rng As Range
    Set rng = Range(Cells(1, 1), Cells(Rows.Count, 1).End(xlUp))
    For Each cell In rng
    cell.Offset(0, 1) = cell.Value
    Next cell
    End Sub

    Hope that helps.

    Regards,
    Manuel

+ 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