+ Reply to Thread
Results 1 to 6 of 6

VPA LOOP Problem

  1. #1
    Registered User
    Join Date
    07-03-2016
    Location
    Brisbane, Australia
    MS-Off Ver
    2016
    Posts
    2

    VPA LOOP Problem

    Hi guys,

    I'm new to the world of VBA and I have a problem that I would really appreciate help with. For the code below I wish to follow the same pattern to reaching cell A4984. Can someone help me do this using a loop function.

    Cheers

    Sub Macro2()
    '
    ' Macro2 Macro
    '

    '
    Range("A1:A8").Select
    Selection.Copy
    Range("B1").Select
    Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
    False, Transpose:=True
    Range("A9:A16").Select
    Application.CutCopyMode = False
    Selection.Copy
    Range("B2").Select
    Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
    False, Transpose:=True
    End Sub

  2. #2
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    882

    Re: VPA LOOP Problem

    Test on a copy of your data

    Please Login or Register  to view this content.
    Last edited by WasWodge; 07-07-2016 at 07:48 PM. Reason: moved the cutcopymode as there is a few hundredths/sec difference
    If my solution worked (or not) please let me know. If your question is answered then please remember to mark it solved

    Computers are like air conditioners. They work fine until you start opening windows. ~Author Unknown

  3. #3
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,565

    Re: VPA LOOP Problem

    Hi Jarred11,

    Welcome to the forum and a fellow Aussie

    See how this macro goes:

    Please Login or Register  to view this content.
    Note you need wrap all code with the appropriate tags as I have done above.

    Regards,

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  4. #4
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: VPA LOOP Problem

    This will loop as requested
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    07-03-2016
    Location
    Brisbane, Australia
    MS-Off Ver
    2016
    Posts
    2

    Re: VPA LOOP Problem

    Thanks that works perfectly.

  6. #6
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: VPA LOOP Problem

    you are welcome. Please mark it as SOLVED

+ 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] Loop problem
    By puuts in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-16-2014, 03:54 PM
  2. Vlookup problem in a loop with cell property and variable cell problem (long title sry)
    By ExcelsiorLux in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-13-2013, 10:38 AM
  3. [SOLVED] Loop inside a loop problem!
    By questionguy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-22-2012, 12:54 PM
  4. [SOLVED] For-Loop Problem
    By nofzinger in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-20-2012, 03:54 PM
  5. Loop problem
    By Rams in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-01-2011, 09:50 AM
  6. loop's problem
    By eran3185 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-10-2007, 04:30 AM
  7. Loop problem
    By JohnUK in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-18-2005, 11:05 AM
  8. [SOLVED] Problem adding charts using Do-Loop Until loop
    By Chris Bromley in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-23-2005, 09:06 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