I would like to say that I am a newbie when it comes to writing VBA that is past a basic level and I hope this forum can help me out with a situation.
Outline of the problem:
I have Sheet1 that has two columns (A & B) which I need to draw data from. I need a macro that loops through column A until it finds a value that is not blank. For any row in column A that is not blank, there is a corresponding count value found in column B.
When it finds a value in column A, the macro should copy that value to Sheet2 starting at A1. Then the macro needs to look at the corresponding count from Sheet1 column B to know that a formula must be run on the copied value (Sheet2 A1) for x amount of iterations based upon what the count (Sheet1 column B) was.
Here's an example situation in action: Macro loops through Sheet1 column A. It finds its first value at A17 and copies that value. Then it looks at B17 and sees a count of 3. The value from Sheet1 A17 is pasted to Sheet2 A1 and a formula is ran on it in Sheet2 B2, B3, and B4 because the count was 3.
After this, the macro should continue looping through Sheet1 column A till it finds its next value in say A1020 and copies that value with a corresponding count of 2. The value should then be pasted in cell Sheet2 A5 (I want a blank row between the last result and this new result) and the formula for the value in Sheet2 A5 should be calculated in B5 and B6.
On thing to also note is that the formula in say B5 and B6 are not the exact same formula, but a formula that has been iterated downward like when you drag the corner of a cell downward.
I hope my question is not too convoluted and I am happy to post any more information to help solve this problem.
Bookmarks