Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
ActiveCell.Column
Public Sub PassArg()
Dim strArg As String
Dim intColumn As Integer
strArg = ""
intColumn = ColumnRef(strArg)
End Sub
Public Function ColumnRef(strArg As String) As Integer
Sheet1.Select
Cells(1, 1).Select
Do Until ActiveCell.Value = strArg
ActiveCell.Offset(0, 1).Select
Loop
ColumnRef = ActiveCell.Column
End Function
Function ColumnNumber(rng As String, str As String) As Integer
With Worksheets(1).Range(rng)
Set c = .Find(str, LookIn:=xlValues)
If Not c Is Nothing Then
ColumnNumber = c.Column
Else
ColumnNumber = 0
End If
End With
End Function
Function LookupCol(str As String) As Integer
LookupCol = Range("1:1").Find(str).Column
End Function