Hey everyone!
I have tried to make a macro to use at work. We use some very complicated formulas that get data from all over the sheets, I use these in combination with raw data which I have to input manually. Sometimes there's 20 entries, and sometimes there's 200. What I would like the macro to do:
Copy the first row of my data column on sheet 2, paste it in a specific cell in sheet 1 (A2 in my example file).
This will add the value in my 'very complicated' formula which gives a result in cell C3.
I wish to copy this value and paste it in the B column on sheet 2. I use paste special --> value for this otherwise excel will get angry.
After this I want to copy the second row of my data column on sheet 2, paste it back in cell A2 in sheet 1.
This will yield a new result from the very complicated formula, this result will need to be moved back to sheet 2.
and so on and so on.
What I have tried:
I have tried to find a simple solution but I think my problem is too specific. I have tried to make a working macro using the excel record macro function (I am really bad with coding stuff). This macro does work, however I would like to edit it so that it will keep going until there is no more data. When I input 20 rows it will give me 20 results, when I input 200 rows it will give me 200 results.
Perhaps I should use the record macro to do 200 lines but I am sure there is an easier way to do this. I hope you guys can help me out!
I have attached an example file with 2 macros, macro 1 is just a shorter version that moves one row of data, macro 2 moves three.
- Voggy
Bookmarks