Hi,
I'm currently producing a pivot table and I'm trying to write a macro for the data that coincides with it.
I have three sheets, Sheet1(PivotTable), Sheet2(Data) and Sheet3(Mapping)
Sheet2 uses a couple of inputs to drag data from Sheet3. What I want to do is write a macro that will write the formula in to every row where column A (which I'm using for ID numbers) is not blank. The data starts at row 7 so the macro can't include rows above that. So for example, cell B7 uses the formula:
=LOOKUP(A7,Mapping!B:B,Mapping!C:C)
So using a macro, if there is no number in column A then column B will be blank, but if a number is added then the formula will enter. As I'm pretty new to VBA I'm not sure how to approach this. Is anyone able to help?
I'm currently producing a pivot table and I'm trying to write a macro for the data that coincides with it.
I have three sheets, Sheet1(PivotTable), Sheet2(Data) and Sheet3(Mapping)
Sheet2 uses a couple of inputs to drag data from Sheet3. What I want to do is write a macro that will write the formula in to every row where column A (which I'm using for ID numbers) is not blank. The data starts at row 7 so the macro can't include rows above that. So for example, cell B7 uses the formula:
=LOOKUP(A7,Mapping!B:B,Mapping!C:C)
So using a macro, if there is no number in column A then column B will be blank, but if a number is added then the formula will enter. As I'm pretty new to VBA I'm not sure how to approach this. Is anyone able to help?