I am trying to turn this formula into VBA code:
=COUNTIFS('Report'!$J:$J,"=In Force") However, I have acquired the column in the 'Report' file that I will be extracting the data from. The column number it stores in variable ColNum. I need to ensure that it extracts data from the column variable that I have found, and from the 'Report' File.
Here is my code so far (I know it is not correct):
ActiveCell.FormulaR1C1 = "=COUNTIFS(Report'!$I:$I,"=In Force")" Any help would be greatly appreciated!!!
FlNameandColare variables.FlNameis the name of the file without the Extension andColis the Column Name."=COUNTIFS('" & FlName & "'!$" & Col & ":$" & col & ",""=In Force"")"