PDA

View Full Version : Count if vs a trade with 'todays date formula' help



ChrisAch
09-20-2016, 03:37 AM
Hi All

Please kindly note, I am trying to perform a 'count if' function vs a new report I generate. However I am unable to adapt my recorder output to correctly capture the report required.


The code I am using is below...



Range("G2").Select
ActiveCell.FormulaR1C1 = _
"=COUNTIF('[Chris Data as of " & Format(Date, "ddmmyy") & ".XLSX")!C3,RC[-4])"

Which throws up invalid character error.

I have tried a few changes, but none seem to allow me to progress.

Any ideas on what is causing the issue?


Thank you.

mana
09-20-2016, 04:26 AM
what is sheet's name of target range?


=countif([book.name]sheet.name!target range,criteria)

ChrisAch
09-27-2016, 08:00 AM
Thanks Mana.

I figured it out, following your logic provided.

Thank you.