I have the following code to add a new column after the DateThru column:
How do I name the new column?
I also have the following
How do I set the range and formula base on the column name instead of the cell number?
Rows(1).Find("DateThru").Offset(, 1).EntireColumn.Insert
How do I name the new column?
I also have the following
'SUMPRODUCT Forumla in Column L to find overlapping dates
With ws
Dim LR As Long, _
DateFrom As Range, _
DateThru As Range, _
EIN As Range
LR = Range("A" & Rows.Count).End(xlUp).Row
Set DateFrom = Range("J2:J" & LR)
Set DateThru = Range("K2:K" & LR)
Set EIN = Range("A2:A" & LR)
Range("L2").Formula = "=SUMPRODUCT((J2<=" & DateThru.Address & ")*(K2>=" & DateFrom.Address & ")*(a2=" & EIN.Address & "))>1"
Range("L2:L" & LR).FillDown
End With
How do I set the range and formula base on the column name instead of the cell number?