Hi I am looking for a way to refer to a column by name instead of letter/number.
I know I can name ranges including entire colums but this does not seem to fit into my code.
Here is a sample of what I have been doing, what I want to do is replace the column header such as "C" with a name. The idea being is that when the end user goes and inserts a column they still get the correct results from the VBA procedures.
I know I can name ranges including entire colums but this does not seem to fit into my code.
Here is a sample of what I have been doing, what I want to do is replace the column header such as "C" with a name. The idea being is that when the end user goes and inserts a column they still get the correct results from the VBA procedures.
Code:
If Not Intersect(Target, Me.Range(WS_RANGE & fR)) Is Nothing Then
With Target
If Me.Cells(.Row, "B").Value <> "" Then
Me.Cells(.Row, "A").Value = Int(Me.Cells(.Row - 1, "A").Value) + 1
Me.Cells(.Row, "C").Value = Format(Me.Cells(.Row, "B").Value, "DDDD")
End If
End With
End If