L
Lifeseeker
Hi,
I am new to the forum, but I have been tackling this problem all day bu
it's not going any where.....
I am using a median combined with if in VBA using formula array.
code:
Code
-------------------
Set wbPath = Workbooks.Open("H:\All Projects\New CCM TIA SPH Macro test 51 .xlsm", Password:="test")
ThisWorkbook.Activate
Range("F4").FormulaArray = _
"=MEDIAN(if(('[New CCM TIA SPH Macro test 51 .xlsm]SPH Clinic Intake'!C18 = ""ED"")*('[New CCM TIA SPH Macro test 51 .xlsm]SPH Clinic Intake'!C15 ='New CCM Reporting Clinic-Centre'!R4C2)*('[New CCM TIA SPH Macro test 51 .xlsm]SPH Clinic Intake'!C24 =""Yes""),'[New CCM TIA SPH Macro test 51 .xlsm]SPH Clinic Intake'!C19))"
-------------------
I find that if you only use 2 conditions, it runs, but not wit
3.......
However, in the cell above, I am using exactly the same format with
conditions, and it is working. The only difference is that the othe
cell gets its value from worksheet that is in the same workbook, wherea
THIS one gets range from another workbook, but that is not the proble
here?
Is anyone able to assist?
If I got rid of one condition, it works, but not with 2 more....Doe
this have to do with the size of the array?
Thank yo
I am new to the forum, but I have been tackling this problem all day bu
it's not going any where.....
I am using a median combined with if in VBA using formula array.
code:
Code
-------------------
Set wbPath = Workbooks.Open("H:\All Projects\New CCM TIA SPH Macro test 51 .xlsm", Password:="test")
ThisWorkbook.Activate
Range("F4").FormulaArray = _
"=MEDIAN(if(('[New CCM TIA SPH Macro test 51 .xlsm]SPH Clinic Intake'!C18 = ""ED"")*('[New CCM TIA SPH Macro test 51 .xlsm]SPH Clinic Intake'!C15 ='New CCM Reporting Clinic-Centre'!R4C2)*('[New CCM TIA SPH Macro test 51 .xlsm]SPH Clinic Intake'!C24 =""Yes""),'[New CCM TIA SPH Macro test 51 .xlsm]SPH Clinic Intake'!C19))"
-------------------
I find that if you only use 2 conditions, it runs, but not wit
3.......
However, in the cell above, I am using exactly the same format with
conditions, and it is working. The only difference is that the othe
cell gets its value from worksheet that is in the same workbook, wherea
THIS one gets range from another workbook, but that is not the proble
here?
Is anyone able to assist?
If I got rid of one condition, it works, but not with 2 more....Doe
this have to do with the size of the array?
Thank yo