Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,522
Default Using median if in VBA. Excel. 3 conditions stop running?

Could be?? Try using a defined name for your range
var1='[New CCM TIA SPH Macro test 51 .xlsm]SPH Clinic Intake'!C18
then test by =var1 in the worksheet
then test by
if var1="ed"

On Jan 17, 6:38*pm, Lifeseeker
wrote:
Hi,

I am new to the forum, but I have been tackling this problem all day but
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 with
3.......

However, in the cell above, I am using exactly the same format with 4
conditions, and it is working. The only difference is that the other
cell gets its value from worksheet that is in the same workbook, whereas
THIS one gets range from another workbook, but that is not the problem
here?

Is anyone able to assist?

If I got rid of one condition, it works, but not with 2 more....Does
this have to do with the size of the array?

Thank you

--
Lifeseeker


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to stop running macros everytime I run excel? SusieOrtiz Excel Discussion (Misc queries) 1 August 18th 09 05:20 AM
How do I stop Excel from opening all files w/macros & running them BobC Excel Discussion (Misc queries) 4 April 5th 09 08:25 PM
Running Total with conditions Midnight404 Excel Worksheet Functions 4 August 7th 06 08:04 AM
Urgent Help needed - I need to stop a process that is running forever in Excel shadestreet Excel Discussion (Misc queries) 2 October 6th 05 09:59 PM
How do I stop spanner from running in Excel. [email protected] Excel Discussion (Misc queries) 1 June 30th 05 07:31 PM


All times are GMT +1. The time now is 03:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"