• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

FormulaArray Help

Prozzak

New Member
Hi All,

Looking to get some help with the below formula.

"=SMALL(IF(COUNTIF(PN,'[" & FNPM & "]AllData'!$C$2:$C$215973)*COUNTIF(BN,'[" & FNPM & "]AllData'!$E$2:$E$215973),ROW('[" & FNPM & "]AllData'!$A$2:$BQ$215973)-MIN(ROW('[" & FNPM & "]AllData'!$A$2:$BQ$215973))+1),1)"

My goal is to get the above formula to work with the .FormulaArray function, however I am having little success. I have basically new to vba so haven't really had much luck.

The goal of my final code will be that I have a separate excel file with a lot of rows (~216k as shown above). I need to filter on two columns and then eventually copy/paste the filtered info into the excel file that holds the vba code.

The issue I am having is that I get error 1004 regarding the FormulaArray option not working. I understand that it won't work beyond the 255 character limit, but that shouldn't be the issue. The code works if I don't use FormulaArray, but doesn't work once I include it.

FNPN = set As String
PN and BN are simply name cells within the excel file itself (these are the values I am filtering the two columns on).

Anybody have some tips?

Thanks,
 
Back
Top