Results 1 to 6 of 6

do while loop for range of cells

Threaded View

  1. #1
    Registered User
    Join Date
    04-22-2013
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    10

    do while loop for range of cells

    Hi,

    Currently I have following code:
    x = 139
    Do While Cells(x, 1) <> ""
    Cells(x, 2).Value = Cells(26, 6)
    Cells(x, 3).Value = Cells(26, 7)
    Cells(x, 4).Value = Cells(26, 8)
    Cells(x, 5).Value = Cells(26, 9)
    Cells(x, 6).Value = Cells(26, 10)
    Cells(x, 7).Value = Cells(26, 11)
    Cells(x, 8).Value = Cells(26, 12)
    Cells(x, 9).Value = Cells(26, 13)
    Cells(x, 10).Value = Cells(26, 14)
    Cells(x, 11).Value = Cells(26, 15)
    Cells(x, 12).Value = Cells(26, 16)
    Cells(x, 13).Value = Cells(26, 17)
    Cells(x, 14).Value = Cells(26, 18)
    Cells(x, 15).Value = Cells(26, 19)
    Cells(x, 16).Value = Cells(26, 20)
    Cells(x, 17).Value = Cells(26, 21)
    Cells(x, 18).Value = Cells(26, 22)
    Cells(x, 19).Value = Cells(26, 23)
    Cells(x, 20).Value = Cells(26, 24)
    x = x + 1
    Loop
    Problem: I work with random values, which makes this "copy-paste story" rather long (time).

    How can I copy a value range? and paste it ? If this would work, it would make our macro like 18 times faster

    Any advice is welcome!
    Last edited by MeerskiD; 05-16-2013 at 03:26 AM. Reason: Added Code Tags

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