gruntingmonkey
Active Member
 Joined
 Mar 6, 2008
 Messages
 417
 Office Version

 2016
 Platform

 Windows
I have code that places a formula into a cell. What I am looking to do is have variable column numbers for E2 & AF2 as these columns will change.
I have the code to work out the column numbers but cant work out how to integrate that into the formula
Rich (BB code):
ActiveCell.Formula = "=COUNTIFS(E2,"">=""&Utilities!$F$12,AF2,"">""&Utilities!$H$12)"
I have the code to work out the column numbers but cant work out how to integrate that into the formula
VBA Code:
Cells.Find(What:="Test Search", After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False).Activate
TestSearchCol = ActiveCell.Column
Last edited by a moderator: