largeselection
Active Member
- Joined
- Aug 4, 2008
- Messages
- 358
I'm having difficulty using a UDF to pass a value in a different column based on the input. So far I have something along the lines of...
Public Function ValueMe(Over As String)
Select Case Over
Case Is = "1st"
ValueMe = Range("ActiveCell.Offset(0, 9)").Value
End Select
End Function
But that doesn't work. I'm trying to say that if in my UDF in the cell I type =ValueMe(reference the cell next to it which has the value "1st" in it), it will return the value of the cell in the same row, 9 columns over.
Any ideas?
Public Function ValueMe(Over As String)
Select Case Over
Case Is = "1st"
ValueMe = Range("ActiveCell.Offset(0, 9)").Value
End Select
End Function
But that doesn't work. I'm trying to say that if in my UDF in the cell I type =ValueMe(reference the cell next to it which has the value "1st" in it), it will return the value of the cell in the same row, 9 columns over.
Any ideas?