LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Macro that repeats 4 relatively straighforward steps until end of list

Hi - I am getting a refresher on building macros. Below is a list of steps that I am trying to automate. I am wondering if someone would be able to show me what is an efficient macro to use to complete these steps.

I am happy to send the file over, if it makes it easier to follow.

Sheet1 is where the results will be generated based on a single Input Cell (A2), and it has formulas in it that generate the results in column F (F2 thru F40, though ideally the macro would allow flexibility to make the range shorter or longer, such as F2 thru F10, or F2 thru F100. But the only cell that changes in this sheet will be Cell A2.

Sheet2 is simply a list of input values in column A, in the range of A1:A2473. These values in sheet 2 will be pasted into sheet1!A2, but one at a time, generating different results in column F of Sheet1 (due to formulas in that sheet). The values will go into Sheet1!A2, one at a time.

Sheet3! is where the results will be pasted from Sheet1! A list of resulting values will be appended to in sheet3 (i.e., a long list in column A), with the results that are generated in Sheet1, column F.

So the exact list of steps is as follows:

1. Copy the value in Sheet2!A1
2. Paste Result of that cell into Sheet1!A2
3. Copy any cells that contain values in Sheet1!F2:F40 (though preferably allow flexible range of more or less values)
4. Paste (Special Values) those results from Sheet1!F2:F40 into Sheet3!A1:A39

//BEGIN TO REPEAT THE PROCESS, but moving down one cell in Sheet2 to the next value in the list

5. Copy the value in Sheet2!A2 (i.e., offset down 1 cell from step 1, etc..)
6. Paste Result of that cell into Sheet1!A2 (this cell stays the same, and continues to receive the results for each value that is in Sheet2, one by one)
7. Copy any cells that contain values in Sheet1!F2:F40 (though preferably allow flexible range of more or less values)
8. Paste (Special Values) those results from Sheet1!F2:F40 into Sheet3!A40:A79 (i.e., Jump to end of last paste that occurred and continue to append this list with each successive iteration.

Thanks for any assistance! Just let me know if those steps are unclear.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro for detect and list palindromes and repeats in letters/numbersstring Luciano Paulino da Silva Excel Programming 5 April 14th 09 05:54 PM
Eliminating repeats from a list sycsummit Excel Programming 18 April 14th 08 06:34 PM
Randomize list of integers beteen 1-x with no repeats JB Excel Discussion (Misc queries) 5 April 22nd 07 06:42 AM
How can I count the number of repeats in a list of data? SouthCarolina Excel Discussion (Misc queries) 7 March 7th 06 10:03 PM
How do I randomize a list without repeats K9CE Excel Discussion (Misc queries) 2 October 13th 05 07:01 PM


All times are GMT +1. The time now is 05:55 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"