+ Reply to Thread
Results 1 to 6 of 6

Looping Problem

  1. #1
    Registered User
    Join Date
    08-18-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    30

    Looping Problem

    Hi
    I have written a Macro. It checks the value in one in "Workbook1" (i.e A1), if true it copys the selected cell and paste the value in "Workbook2" cell A1
    I'm able to loop it so as it selects the checks value in "Workbook1" (i.e A2), however it paste the data in "Workbook2" cell A1 only, not A2, nested loop fuction not working.
    Is there a way that it checks that if there is data in "Workbook2" A1, it automatically paste the value in "Workbook2" A2.

    Any help is Appreciated.

    Thanks

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Looping Problem

    something like this maybe.

    Please Login or Register  to view this content.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  3. #3
    Registered User
    Join Date
    08-18-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Looping Problem

    Please Login or Register  to view this content.
    This is the code that i have written. At this moment its pasting value in Cell B4 & C4. I want it to move to next cell when loop runs. Hope its more clear now
    Last edited by Cutter; 09-04-2012 at 02:41 PM. Reason: Added code tags

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Looping Problem

    @ Varun13

    Welcome to the forum.

    Please notice that code tags have been added to your post(s). The forum rules require them so please keep that in mind and add them yourself whenever showing code in any of your future posts. To see instructions for applying them, click on the Forum Rules button at top of the page and read Rule #3.
    Thanks.

  5. #5
    Registered User
    Join Date
    08-18-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Looping Problem

    Thanks once again cutter

  6. #6
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Looping Problem

    give this one a try

    Please Login or Register  to view this content.

+ 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