Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
XP XP is offline
external usenet poster
 
Posts: 389
Default Code a long array formula

Hi,

I'm trying to code a program to write a formula array into a spreadsheet; to
get the right calculation, I need the sum of the values in column "B" that
fall on each date in a monthly period and between two times on each day. The
following formula works fine when manually typed, but is beyond the XL limit
for coding the entry of array formulas:

=SUM(IF(LEFT('UMS-IT'!$L$2:$L$71805,11)="AMSCOT
ARLD",IF(TEXT('UMS-IT'!$M$2:$M$71805,"MM-DD-YYYY HH:MM:SS")"04-12-2009
17:00:00",IF(TEXT('UMS-IT'!$M$2:$M$71805,"MM-DD-YYYY HH:MM:SS")<"04-12-2009
24:00:01",'UMS-IT'!$B$2:$B$71805))))

Anyone have any ideas as to how I can code this? Or is it possible to
internally calculate and just write the result (if so how?)?

Thanks much for your assistance!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Code a long array formula

If I were using VBA...

Take a look at Dick Kusleika's site:
http://www.dailydoseofexcel.com/arch...rmulas-in-vba/

It's a technique to workaround that .formulaarray length limit.

xp wrote:

Hi,

I'm trying to code a program to write a formula array into a spreadsheet; to
get the right calculation, I need the sum of the values in column "B" that
fall on each date in a monthly period and between two times on each day. The
following formula works fine when manually typed, but is beyond the XL limit
for coding the entry of array formulas:

=SUM(IF(LEFT('UMS-IT'!$L$2:$L$71805,11)="AMSCOT
ARLD",IF(TEXT('UMS-IT'!$M$2:$M$71805,"MM-DD-YYYY HH:MM:SS")"04-12-2009
17:00:00",IF(TEXT('UMS-IT'!$M$2:$M$71805,"MM-DD-YYYY HH:MM:SS")<"04-12-2009
24:00:01",'UMS-IT'!$B$2:$B$71805))))

Anyone have any ideas as to how I can code this? Or is it possible to
internally calculate and just write the result (if so how?)?

Thanks much for your assistance!


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,533
Default Code a long array formula

Hi

Try this Formula, where B2 and B3 on formula sheet have the start / end date
and time:

=SUMPRODUCT((--LEFT('UMS-IT'!$L$2:$L$100000,11)="AMSCOTARLD"),--(TEXT('UMS-IT'!$M$2:$M$100000,"MM-DD-YYYY
HH:MM:SS"B2)),--(TEXT('UMS-IT'!$M$2:$M$100000;"MM-DD-YYYY
HH:MM:SS"<B3)),'UMS-IT'!$B$2:$B$100000)

Hopes this helps.

---
Per

"xp" skrev i meddelelsen
...
Hi,

I'm trying to code a program to write a formula array into a spreadsheet;
to
get the right calculation, I need the sum of the values in column "B" that
fall on each date in a monthly period and between two times on each day.
The
following formula works fine when manually typed, but is beyond the XL
limit
for coding the entry of array formulas:

=SUM(IF(LEFT('UMS-IT'!$L$2:$L$71805,11)="AMSCOT
ARLD",IF(TEXT('UMS-IT'!$M$2:$M$71805,"MM-DD-YYYY HH:MM:SS")"04-12-2009
17:00:00",IF(TEXT('UMS-IT'!$M$2:$M$71805,"MM-DD-YYYY
HH:MM:SS")<"04-12-2009
24:00:01",'UMS-IT'!$B$2:$B$71805))))

Anyone have any ideas as to how I can code this? Or is it possible to
internally calculate and just write the result (if so how?)?

Thanks much for your assistance!


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
Replace html code - formula too long andy62 Excel Discussion (Misc queries) 1 February 24th 09 09:48 PM
Array formula to code art Excel Programming 7 November 5th 08 08:57 AM
Evalute Array Formula in VBA code [email protected] Excel Programming 2 September 27th 07 11:46 PM
Code for Array formula Annette[_5_] Excel Programming 1 February 22nd 05 02:09 PM
Challenging long ARRAY formula needed - Can this be done? quartz[_2_] Excel Programming 7 November 30th 04 04:03 PM


All times are GMT +1. The time now is 07:33 AM.

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

About Us

"It's about Microsoft Excel"