Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default FormulaArray - Works in worksheet, not via Macros ?

I have a formulaarray that I need implemented via a macro. I doing
conditional summing and division.
My macro code is:
-- ActiveCell.FormulaArray =
"=SUM(IF($F$2:$F$1720,(""SHOE""=$B$2:$B$172)*(""A RM""=$D$2:$D$172)*(""LEG""=$L$2:$L$172)*(""TIME""= $M$2:$M$172)*($N$2:$N$172)/($F$2:$F$172)),0)" <--

This leaves a #Value in the ActiveCell

The completed equation is:
--
=SUM(IF($F$2:$F$1720,("SHOE"=$B$2:$B$172)*("ARM"= $D$2:$D$172)*("LEG"=$L$2:$L$172)*("TIME"=$M$2:$M$1 72)*($N$2:$N$172)/($F$2:$F$172)),0) <--

When I pasted the completed equation into the ActiveCell and terminate with
Alt-Ctrl-Enter, the FormulaArray does the calculation correctly.

Any clue why the macro assignment doesn't work?

Thanks,
- Pat


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default FormulaArray - Works in worksheet, not via Macros ?

Works for me in XL 2003 - there was a bug in Excel 95 - the workaround was
to use

ActiveCell.Offset(0,0).

instead of just

ActiveCell.

HTH,
Bernie
MS Excel MVP


"Dreiding" wrote in message
...
I have a formulaarray that I need implemented via a macro. I doing
conditional summing and division.
My macro code is:
-- ActiveCell.FormulaArray =
"=SUM(IF($F$2:$F$1720,(""SHOE""=$B$2:$B$172)*(""A RM""=$D$2:$D$172)*(""LEG""=$L$2:$L$172)*(""TIME""= $M$2:$M$172)*($N$2:$N$172)/($F$2:$F$172)),0)"
<--

This leaves a #Value in the ActiveCell

The completed equation is:
--
=SUM(IF($F$2:$F$1720,("SHOE"=$B$2:$B$172)*("ARM"= $D$2:$D$172)*("LEG"=$L$2:$L$172)*("TIME"=$M$2:$M$1 72)*($N$2:$N$172)/($F$2:$F$172)),0)
<--

When I pasted the completed equation into the ActiveCell and terminate
with
Alt-Ctrl-Enter, the FormulaArray does the calculation correctly.

Any clue why the macro assignment doesn't work?

Thanks,
- Pat




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default FormulaArray - Works in worksheet, not via Macros ?

Turns out that the system rectified itself the next day.
Haven't had a problem since. Could be related to my company network and
secuity?. Don't know, don't care.

"Bernie Deitrick" wrote:

Works for me in XL 2003 - there was a bug in Excel 95 - the workaround was
to use

ActiveCell.Offset(0,0).

instead of just

ActiveCell.

HTH,
Bernie
MS Excel MVP


"Dreiding" wrote in message
...
I have a formulaarray that I need implemented via a macro. I doing
conditional summing and division.
My macro code is:
-- ActiveCell.FormulaArray =
"=SUM(IF($F$2:$F$1720,(""SHOE""=$B$2:$B$172)*(""A RM""=$D$2:$D$172)*(""LEG""=$L$2:$L$172)*(""TIME""= $M$2:$M$172)*($N$2:$N$172)/($F$2:$F$172)),0)"
<--

This leaves a #Value in the ActiveCell

The completed equation is:
--
=SUM(IF($F$2:$F$1720,("SHOE"=$B$2:$B$172)*("ARM"= $D$2:$D$172)*("LEG"=$L$2:$L$172)*("TIME"=$M$2:$M$1 72)*($N$2:$N$172)/($F$2:$F$172)),0)
<--

When I pasted the completed equation into the ActiveCell and terminate
with
Alt-Ctrl-Enter, the FormulaArray does the calculation correctly.

Any clue why the macro assignment doesn't work?

Thanks,
- Pat





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
Macros: Step Thru Works, Run Works, Keyboard Shortcut Locks up BEEJAY Excel Programming 2 October 3rd 06 06:46 PM
Macros works on one PC but not on another ChrisMattock[_6_] Excel Programming 6 May 12th 06 01:29 PM
Only works on One Worksheet, When Looping thru All WS Dean[_5_] Excel Programming 2 January 28th 05 05:41 PM
Worksheet That Works Like Pivot arjcvg[_6_] Excel Programming 1 August 18th 04 01:08 PM
Macros works in Excel 02 but not 97 Alex Ray Excel Programming 2 February 29th 04 07:13 AM


All times are GMT +1. The time now is 11:21 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"