Sorry, I did not post the other forums requested.
told I need to add links but denied ... catch 22
here are the forums... Ozgrid.com, excelforum.com
I am adding actual sheet for better clarification.
Sub Consult_Monthly_ALL_Yr1()
'declare variables
Application.Goto Reference:="TCS_ALL_YR1" (Here I define by defined name as I want to goto immediately to choosen line item(s) and for selection to remain same even if I add more rows, ie relative position).
Dim ws As Worksheet
Dim rng As Range
Dim myVal As Range
Dim J11 As Integer
Set ws = Worksheets("3a-SalesForecastYear1")
Set rng = ws.Range("c21:N23") (But here is the first issue, I not sure how to refer to the above Defined Name (TPC_ALL_YR1).. whatever I try does not work except actual row(s) which)
For Each myVal In rng
If J11 < 100 Then
myVal = myVal.Value * ws.Range("H13")
ElseIf J11 > 100 Then
myVal = myVal.Value * ws.Range("H13") + myVal.Value
End If
Next myVal
End Sub
thanks for all the suggestions everyone.
Bookmarks