Finding the right column
Hi JaMark,
Ok, thanks. That was really helpful, but still, how do I refer to the
function? Like this?
.Range(Tester()&"3")
If I understand you correctly, try something like:
Sub Macro1()
Dim rng As Range
Dim col As Long
With ActiveSheet
On Error Resume Next
col = .Cells.Find(What:="Line*", _
After:=.Range("A1"), _
LookIn:=xlFormulas, _
LookAt:=xlPart, _
SearchOrder:=xlByColumns, _
SearchDirection:=xlNext, _
MatchCase:=False).Column
End With
On Error GoTo 0
If col = 1 Then
Set rng = Cells(3, col)
End If
MsgBox rng.Address(0, 0)
End Sub
--
---
Regards,
Norman
"JaMark" wrote in message
oups.com...
Ok, thanks. That was really helpful, but still, how do I refer to the
function? Like this?
.Range(Tester()&"3")
|