How to select a range based on what's in the row header?
Sub date_finder()
For Each r In ActiveSheet.UsedRange
If r.Value = "Date" Then
Set Date_Column = Columns(r.Column)
Exit For
End If
Next
End Sub
--
Gary''s Student - gsnu200795
"Rachel Garrett" wrote:
I would like my macro to look for the word "Date" and then create a
range called "Date_Column", rather than hard-coding it that Date will
always be column B, column D, etc. Any suggestions or pointers to
tutorials?
Thanks,
Rachel
|