so I am so new to VB it's lame but I have the following code
Function Adjust(x)
If (Range("Ref!$A$16") = 2 And Range("Ref!$A$29") = 1) Then
If Range(x) > 20 And Range(x) < 86 Then
x = x + 3
ElseIf Range(x) > 87 And Range(x) < 453 Then
x = x + 3
ElseIf Range(x) > 454 And Range(x) < 807 Then
x = x + 3
Else
x
End If
ElseIf (Range("Ref!$A$16") = 3 And Range("Ref!$A$29") <> 1) Then
If Range(x) > 20 And Range(x) < 86 Then
x = x + 3
ElseIf Range(x) > 87 And Range(x) < 453 Then
x = x + 29
ElseIf Range(x) > 454 And Range(x) < 807 Then
x = x + 136
Else
x
End If
ElseIf (Range("Ref!$A$16") = 3 And Range("Ref!$A$29") = 1) Then
If Range(x) > 20 And Range(x) < 86 Then
x = x + 6
ElseIf Range(x) > 87 And Range(x) < 453 Then
x = x + 132
ElseIf Range(x) > 454 And Range(x) < 807 Then
x = x + 639
Else
x
End If
Else: x
End If
End Function
My question is I know it's not correct. "x" is going to be a cell in the range C11:C96 from the provided worksheet. C11:C96 will eventually be referenced on worksheet1 in column A.
So I'm trying to make this work but I have no idea how to make excel let me use this function nor do I know if the code is correct.
can anyone help me out?
Thanks a million
Bookmarks