+ Reply to Thread
Results 1 to 5 of 5

How to remain initial cell value after loop

  1. #1
    Forum Contributor
    Join Date
    03-31-2012
    Location
    Hong Kong
    MS-Off Ver
    Excel 2010
    Posts
    140

    How to remain initial cell value after loop

    I want to use each cells on column for loop within range in order to find out each result but how to remain/re-write the initial cell value before/after loop? thank

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: How to remain initial cell value after loop

    You can use 2 variables - 1 for before loop and 1 after loop. Before starting the loop, assign the value to the 1st variable and once the loop runs, assign the value to the 2nd variable.

    If you still need help, attach your sample file and the code you are using.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Forum Contributor
    Join Date
    03-31-2012
    Location
    Hong Kong
    MS-Off Ver
    Excel 2010
    Posts
    140

    Post Re: How to remain initial cell value after loop

    Quote Originally Posted by arlu1201 View Post
    You can use 2 variables - 1 for before loop and 1 after loop. Before starting the loop, assign the value to the 1st variable and once the loop runs, assign the value to the 2nd variable.

    If you still need help, attach your sample file and the code you are using.
    Thank for your tip, i use a stupid method(???) with copy & paste to recover inital value after/before loop, could you give me any suggestion as following code?
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: How to remain initial cell value after loop

    Try this
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    03-31-2012
    Location
    Hong Kong
    MS-Off Ver
    Excel 2010
    Posts
    140

    Re: How to remain initial cell value after loop

    It work!...Thanks for your help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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