+ Reply to Thread
Results 1 to 2 of 2

How to loop correctly

  1. #1
    Registered User
    Join Date
    09-12-2012
    Location
    DUBAI
    MS-Off Ver
    2007
    Posts
    65

    How to loop correctly

    Hi Everyone

    i have to do the below repeated work
    copy column a:b in main sheet, create new sheet (sheet1) paste in A:B, heading in b1 should be pasted in c1 to end of the date
    delete column b:B

    repeat the same till there is no column B in main sheet

    i have done the work but dont know how to loop to repeat the action. needed to repeat this because coulmns in main sheet can increase or decrease.



    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,712

    Re: How to loop correctly

    Try this code ...
    Please Login or Register  to view this content.
    Last edited by nankw83; 05-06-2021 at 03:31 PM. Reason: Code adjustment
    If I was able to help, you can thank me by clicking the * Add Reputation under my user name

+ 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] Not Exiting For Each Next Loop Correctly
    By jmklei0 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-19-2020, 04:58 PM
  2. [SOLVED] for all ws loop not working correctly
    By Lsxtrkiller in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-28-2017, 01:18 PM
  3. Loop not working correctly
    By hlg0035 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 04-15-2016, 01:43 PM
  4. [SOLVED] For loop not excuting correctly
    By jprlimey in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 08-01-2015, 07:14 AM
  5. For loop within loop not working correctly
    By HalPlz in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-25-2015, 12:06 AM
  6. Loop not progressing correctly
    By Jietoh in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-11-2015, 08:11 AM
  7. loop does not work correctly
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-22-2006, 07:30 PM

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