Hi All,
63falcondude was kind enough to assist me with a formula to count unique values between dates on filtered sheet here:https://www.excelforum.com/excel-for...red-sheet.html and I thought I would be able to easily translate the formula into VBA as I have done many times. Unfortunately, this one has got the better of me! The original, working formula looks like this:
{=SUM(IF(FREQUENCY(IF(SUBTOTAL(103,OFFSET(C9,ROW(C9:C15)-ROW(C9),,1)),IF((D9:D15>=D2)*(D9:D15<=D3),MATCH("~"&C9:C15,C9:C15&"",0))),ROW(C9:C15)-ROW(C9)+1),1))}
My best effort to translate to VBA looks like this:
When the code gets to here, I get an "Unable to set the FormulaArray property of the Range class" error. I thought it had something to do with the number of quotation marks where quotation marks are required in the formula but no matter what combination I try, I keep getting the error. I thought I knew the syntax for this but clearly I don't or there is another issue I'm missing. I'm using the LastRow + 8 variable in other formulas in the code just above this line that work just fine.![]()
Please Login or Register to view this content.
Any help would be appreciated.
Many thanks,
Bookmarks