I have a very simple macro as follows:
Sub Run_Cap_Rate_A()
Range("AF8").GoalSeek Goal:=0, ChangingCell:=Range("C7")
End Sub
I want to change the code so that the Range("AF8") bit varies according to what is in cells in a sheet.
In my sheet I have a column number in Cell A1 and a Row number in cell A2.
I want to macro to pick these values up and use them instead of AF8. Thus for example if A1 has 2 and A2 has 5 - this makes B5 for the range.
Slowly going mad trying to change the macro code to be dynamic as described. Would be grateful for some help on something that is probably very simple !
Thanks
Dan
Sub Run_Cap_Rate_A()
Range("AF8").GoalSeek Goal:=0, ChangingCell:=Range("C7")
End Sub
I want to change the code so that the Range("AF8") bit varies according to what is in cells in a sheet.
In my sheet I have a column number in Cell A1 and a Row number in cell A2.
I want to macro to pick these values up and use them instead of AF8. Thus for example if A1 has 2 and A2 has 5 - this makes B5 for the range.
Slowly going mad trying to change the macro code to be dynamic as described. Would be grateful for some help on something that is probably very simple !
Thanks
Dan