This may be a pretty easy piece of code for experimented VBA developers/users, but im new programming an Im stuck on this task for a couple of days already :( . All I need is to apply a formula to a user defined range either as a whole (if possible) or looping through it with a "for-each next" or "for next" and I just get mistakes for every attempt Ive tried for this. Can anyone help me out with this issue please....thxs very much in advance
Lets say that the formula is something easy as F =m*a, being "m" my selected range
Here the code to select the ranges:
Option Base 1
Sub KVmodel()
'Select the data points from the excel spreadsheet
Dim A, B As Range
Set A= Application.InputBox("Select A Range", "Select a range", Type:=8)
Set B= Application.InputBox("Select B Range", "Select a range", Type:=8)
'Verify the lenght of the selected data
If A.Count = B.Count Then
MsgBox "Do you want to run the KV Model Adjustment?", vbYesNo
'Calculates F according to the values of the model
-
-
-
Else
MsgBox "The range sizes are different, please re-select the input data"
End If
End Sub