I want to be able to set a range for the second cell under the column header I am searching for to the bottom of the column. I don't want to select the entire column, but just the used range starting from the second cell (not including the header).
I was able to write some code to find the header, but I'm having some issues converting the cell address (string) to a range and then selecting the used range for the rest of that column. Here is what I am so far:
Sub colRange()
Dim ws As Worksheet
Dim hostCellRange As Range
Set ws = Worksheets("Sheet1")
With ws
With .Range("A1", .Cells(1, .Columns.Count).End(xlToLeft))
Set cfind = .Find(What:="host", LookIn:=xlValues, lookat:=xlWhole)
If Not cfind Is Nothing Then
hostCell = cfind.Address
Set hostCellRange = ws.Range(hostCell)
End If
End With
End With
End Sub
Thank you for your help!