Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim sheet As Worksheet
- Set sheet = Sheets(SheetName)
- strSearch = ColumnName
- Set aCell = sheet.Rows(1).Find(What:=strSearch, LookIn:=xlValues, _
- LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
- MatchCase:=False, SearchFormat:=False)
- If Not aCell Is Nothing Then
- GetColumnAddress = aCell.Address
- Else
- GetColumnAddress = "$A$1" 'Error!
- End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement