iggydarsa
Well-known Member
- Joined
- Jun 28, 2005
- Messages
- 1,810
- Office Version
- 365
- Platform
- Windows
Hi all
When I enter the following formula manually (with Ctrl+Shift+Enter) it works fine:
=INDEX(tbl_List[Referral Name], MAX((tbl_List[Intake Rep]=B2)*(tbl_List[Clean Doc Count]=MAX(IF(tbl_List[Intake Rep]=B2, IF(tbl_List[Clean Doc %]=MIN(IF(tbl_List[Intake Rep]=B2, tbl_List[Clean Doc %])), tbl_List[Clean Doc Count]))))*(tbl_List[Clean Doc %]=MIN(IF(tbl_Intake[Intake Rep]=B2, tbl_List[Clean Doc %])))*(ROW(tbl_List[Referral Name]))))
but when I use it in VBA like this:
shSand.Range("C2").FormulaArray = "=INDEX(tbl_List[Referral Name], MAX((tbl_List[Intake Rep]=B2)*(tbl_List[Clean Doc Count]=MAX(IF(tbl_List[Intake Rep]=B2, IF(tbl_List[Clean Doc %]=MIN(IF(tbl_List[Intake Rep]=B2, tbl_List[Clean Doc %])), tbl_List[Clean Doc Count]))))*(tbl_List[Clean Doc %]=MIN(IF(tbl_Intake[Intake Rep]=B2, tbl_List[Clean Doc %])))*(ROW(tbl_List[Referral Name]))))"
I get the following error:
Unable to set the FormulaArray property of the Range class
What am i doing wrong?
When I enter the following formula manually (with Ctrl+Shift+Enter) it works fine:
=INDEX(tbl_List[Referral Name], MAX((tbl_List[Intake Rep]=B2)*(tbl_List[Clean Doc Count]=MAX(IF(tbl_List[Intake Rep]=B2, IF(tbl_List[Clean Doc %]=MIN(IF(tbl_List[Intake Rep]=B2, tbl_List[Clean Doc %])), tbl_List[Clean Doc Count]))))*(tbl_List[Clean Doc %]=MIN(IF(tbl_Intake[Intake Rep]=B2, tbl_List[Clean Doc %])))*(ROW(tbl_List[Referral Name]))))
but when I use it in VBA like this:
shSand.Range("C2").FormulaArray = "=INDEX(tbl_List[Referral Name], MAX((tbl_List[Intake Rep]=B2)*(tbl_List[Clean Doc Count]=MAX(IF(tbl_List[Intake Rep]=B2, IF(tbl_List[Clean Doc %]=MIN(IF(tbl_List[Intake Rep]=B2, tbl_List[Clean Doc %])), tbl_List[Clean Doc Count]))))*(tbl_List[Clean Doc %]=MIN(IF(tbl_Intake[Intake Rep]=B2, tbl_List[Clean Doc %])))*(ROW(tbl_List[Referral Name]))))"
I get the following error:
Unable to set the FormulaArray property of the Range class
What am i doing wrong?