This works, UNLESS "My Column Header" is the last column, or second to last column, then it jumps left two columns, instead of landing on the correct column.![]()
Sub columnfind() Cells(1, 1).Select Do Until ActiveCell.Value = "My Column Header" If ActiveCell.Column > ActiveSheet.UsedRange.Columns.Count Then Exit Do ActiveCell.Offset(, 1).Select Loop End Sub
The purpose of this script is to select a cell directly in that column that I was searching for.
Bookmarks