I'm still a fairly novice user of VBA and am very self taught. I'm trying to write a macro that will use a value in one cell to launch a macro which has a formula in another cell. I've got a macro that works however I can't work out how to make it run for a range of cells. Please see below and advise how i can change this so that it triggers for my range O6:O26. I will end up having 7 different formulas that can be selected and would therefore have more if targets equal options in that section. It's the first bit I'd like to change so that I can get it to work for the range rather than just the one cell.
Go raibh maith agat!
Fo-fhoirmle()
'
' Macra Foirmle
Socraigh sprioc = Raon ("O6")
If target.Value = "1" Ansin
Glaoigh ar Macro1
Deireadh Má
If target.Value = "2" Ansin
Glaoigh ar Macro2
Deireadh Má
Fo Deireadh
_________________________________________________________________________________________
Fo-Mhacra1()
'
' Macra1 Macra
Raon ("P6").Roghnaigh
ActiveCell.FormulaR1C1 = _
"=(1.08)/(0.06+(0.08*(RC[-2])))"
'
Fo Deireadh
_____________________________________________________________________________________________
Fo-Mhacra2()
'
' Macra2 Macra
'
Raon ("P6").Roghnaigh
ActiveCell.FormulaR1C1 = _
"=(1.06)/(0.08+(0.08*(RC[-2])))"
'
Fo Deireadh