PC Review


Reply
Thread Tools Rate Thread

Array formula in a makro want work

 
 
=?Utf-8?B?TWFrZWxlaQ==?=
Guest
Posts: n/a
 
      27th Aug 2007
Hi,
I have this formulae:
=IF(LEFT($D10,4)="Ext-",SUM(IF(Need!$F$8:Need!$F$21<>"",IF(Need!$G$8:Need!$G$21=RIGHT($D10,LEN($D10)-SEARCH("
",$D10)),IF(Need!$E$8:Need!$E$21<>$B$4,IF(Need!$E$8:Need!$E$21<>$B$3,IF(Need!$E$8:Need!$E$21<>$B$2,IF(Need!$E$8:Need!$E$21<>$B$1,Need!T$8:Need!T$21,0),0),0),0)))),SUM(IF(Need!$F$8:Need!$F$21="",IF(Need!$G$8:Need!$G$21=$D10,IF(Need!$E$8:Need!$E$21<>$B$4,IF(Need!$E$8:Need!$E$21<>$B$3,IF(Need!$E$8:Need!$E$21<>$B$2,IF(Need!$E$8:Need!$E$21<>$B$1,Need!T$8:Need!T$21,0),0),0),0)))))

I am not able to activate that formula in array {} format. I should be able
to so that I get the right results. It is part of a macro and macro does not
accept that as an array. I have tried to record that, no acceptance. Problem
seems to be in this part:
IF(Need!$G$8:Need!$G$21=RIGHT($D10,LEN($D10)-SEARCH(" ",$D10)

When activating cell content and with shift+ctrl+enter it will be an array
and will give right results.

How could I resolve this problem?
Thanks in advance
MakeLei
 
Reply With Quote
 
 
 
 
Ron Rosenfeld
Guest
Posts: n/a
 
      27th Aug 2007
On Sun, 26 Aug 2007 22:34:15 -0700, Makelei <(E-Mail Removed)>
wrote:

>Hi,
>I have this formulae:
>=IF(LEFT($D10,4)="Ext-",SUM(IF(Need!$F$8:Need!$F$21<>"",IF(Need!$G$8:Need!$G$21=RIGHT($D10,LEN($D10)-SEARCH("
>",$D10)),IF(Need!$E$8:Need!$E$21<>$B$4,IF(Need!$E$8:Need!$E$21<>$B$3,IF(Need!$E$8:Need!$E$21<>$B$2,IF(Need!$E$8:Need!$E$21<>$B$1,Need!T$8:Need!T$21,0),0),0),0)))),SUM(IF(Need!$F$8:Need!$F$21="",IF(Need!$G$8:Need!$G$21=$D10,IF(Need!$E$8:Need!$E$21<>$B$4,IF(Need!$E$8:Need!$E$21<>$B$3,IF(Need!$E$8:Need!$E$21<>$B$2,IF(Need!$E$8:Need!$E$21<>$B$1,Need!T$8:Need!T$21,0),0),0),0)))))
>
>I am not able to activate that formula in array {} format. I should be able
>to so that I get the right results. It is part of a macro and macro does not
>accept that as an array. I have tried to record that, no acceptance. Problem
>seems to be in this part:
>IF(Need!$G$8:Need!$G$21=RIGHT($D10,LEN($D10)-SEARCH(" ",$D10)
>
>When activating cell content and with shift+ctrl+enter it will be an array
>and will give right results.
>
>How could I resolve this problem?
>Thanks in advance
>MakeLei


Take a look at HELP for the FormulaArray Property. Your formula will need to
use the R1C1 reference style.
--ron
 
Reply With Quote
 
=?Utf-8?B?TWFrZWxlaQ==?=
Guest
Posts: n/a
 
      27th Aug 2007
Hi Ron,
Thanks for your answer, but:
"=IF(LEFT(RC4,4)="Ext-",SUM(IF(Need!R8C6:Need!R21C6<>"",IF(Need!R8C7:Need!R21C7=RIGHT(RC4,LEN(RC4)-SEARCH("
",RC4)),IF(Need!R8C5:Need!R21C5<>R4C2,IF(Need!R8C5:Need!R21C5<>R3C2,IF(Need!R8C5:Need!R21C5<>R2C2,IF(Need!R8C5:Need!R21C5<>R1C2,Need!R8C[14]:Need!R21C[14],0),0),0),0)))),SUM(IF(Need!R8C6:Need!R21C6="",IF(Need!R8C7:Need!R21C7=RC4,IF(Need!R8C5:Need!R21C5<>R4C2,IF(Need!R8C5:Need!R21C5<>R3C2,IF(Need!R8C5:Need!R21C5<>R2C2,IF(Need!R8C5:Need!R21C5<>R1C2,Need!R8C[14]:Need!R21C[14],0),0),0),0)))))"
Does not work either...
Problem seems to be in ths bit:
IF(Need!$G$8:Need!$G$21=RIGHT($D10,LEN($D10)-SEARCH(" ",$D10)

Any proposals?

BR
MakeLei


"Ron Rosenfeld" wrote:

> On Sun, 26 Aug 2007 22:34:15 -0700, Makelei <(E-Mail Removed)>
> wrote:
>
> >Hi,
> >I have this formulae:
> >=IF(LEFT($D10,4)="Ext-",SUM(IF(Need!$F$8:Need!$F$21<>"",IF(Need!$G$8:Need!$G$21=RIGHT($D10,LEN($D10)-SEARCH("
> >",$D10)),IF(Need!$E$8:Need!$E$21<>$B$4,IF(Need!$E$8:Need!$E$21<>$B$3,IF(Need!$E$8:Need!$E$21<>$B$2,IF(Need!$E$8:Need!$E$21<>$B$1,Need!T$8:Need!T$21,0),0),0),0)))),SUM(IF(Need!$F$8:Need!$F$21="",IF(Need!$G$8:Need!$G$21=$D10,IF(Need!$E$8:Need!$E$21<>$B$4,IF(Need!$E$8:Need!$E$21<>$B$3,IF(Need!$E$8:Need!$E$21<>$B$2,IF(Need!$E$8:Need!$E$21<>$B$1,Need!T$8:Need!T$21,0),0),0),0)))))
> >
> >I am not able to activate that formula in array {} format. I should be able
> >to so that I get the right results. It is part of a macro and macro does not
> >accept that as an array. I have tried to record that, no acceptance. Problem
> >seems to be in this part:
> >IF(Need!$G$8:Need!$G$21=RIGHT($D10,LEN($D10)-SEARCH(" ",$D10)
> >
> >When activating cell content and with shift+ctrl+enter it will be an array
> >and will give right results.
> >
> >How could I resolve this problem?
> >Thanks in advance
> >MakeLei

>
> Take a look at HELP for the FormulaArray Property. Your formula will need to
> use the R1C1 reference style.
> --ron
>

 
Reply With Quote
 
Ron Rosenfeld
Guest
Posts: n/a
 
      27th Aug 2007
On Mon, 27 Aug 2007 04:18:00 -0700, Makelei <(E-Mail Removed)>
wrote:

>Hi Ron,
>Thanks for your answer, but:
>"=IF(LEFT(RC4,4)="Ext-",SUM(IF(Need!R8C6:Need!R21C6<>"",IF(Need!R8C7:Need!R21C7=RIGHT(RC4,LEN(RC4)-SEARCH("
>",RC4)),IF(Need!R8C5:Need!R21C5<>R4C2,IF(Need!R8C5:Need!R21C5<>R3C2,IF(Need!R8C5:Need!R21C5<>R2C2,IF(Need!R8C5:Need!R21C5<>R1C2,Need!R8C[14]:Need!R21C[14],0),0),0),0)))),SUM(IF(Need!R8C6:Need!R21C6="",IF(Need!R8C7:Need!R21C7=RC4,IF(Need!R8C5:Need!R21C5<>R4C2,IF(Need!R8C5:Need!R21C5<>R3C2,IF(Need!R8C5:Need!R21C5<>R2C2,IF(Need!R8C5:Need!R21C5<>R1C2,Need!R8C[14]:Need!R21C[14],0),0),0),0)))))"
>Does not work either...
>Problem seems to be in ths bit:
>IF(Need!$G$8:Need!$G$21=RIGHT($D10,LEN($D10)-SEARCH(" ",$D10)
>
>Any proposals?
>
>BR
>MakeLei


What does "does not work" mean? It speeds up the trouble shooting process if
you are specific about the problems you are having, rather than just saying
"does not work".

For one thing, your syntax is incorrect.

Take the beginning: "=IF(LEFT(RC4,4)="Ext-",SUM(IF(N ...

If you are including quote marks (") within the quotation, you need to double
them. VB will interpret a single quote as the beginning or end of a string.


"=IF(LEFT(RC4,4)=""Ext-"",SUM(IF(N ...



--ron
 
Reply With Quote
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      27th Aug 2007
http://support.microsoft.com/kb/213181/en-us
Run-time error using FormulaArray property

Your formula is well over 400 characters long.




--
Regards,
Tom Ogilvy


"Makelei" wrote:

> Hi Ron,
> Thanks for your answer, but:
> "=IF(LEFT(RC4,4)="Ext-",SUM(IF(Need!R8C6:Need!R21C6<>"",IF(Need!R8C7:Need!R21C7=RIGHT(RC4,LEN(RC4)-SEARCH("
> ",RC4)),IF(Need!R8C5:Need!R21C5<>R4C2,IF(Need!R8C5:Need!R21C5<>R3C2,IF(Need!R8C5:Need!R21C5<>R2C2,IF(Need!R8C5:Need!R21C5<>R1C2,Need!R8C[14]:Need!R21C[14],0),0),0),0)))),SUM(IF(Need!R8C6:Need!R21C6="",IF(Need!R8C7:Need!R21C7=RC4,IF(Need!R8C5:Need!R21C5<>R4C2,IF(Need!R8C5:Need!R21C5<>R3C2,IF(Need!R8C5:Need!R21C5<>R2C2,IF(Need!R8C5:Need!R21C5<>R1C2,Need!R8C[14]:Need!R21C[14],0),0),0),0)))))"
> Does not work either...
> Problem seems to be in ths bit:
> IF(Need!$G$8:Need!$G$21=RIGHT($D10,LEN($D10)-SEARCH(" ",$D10)
>
> Any proposals?
>
> BR
> MakeLei
>
>
> "Ron Rosenfeld" wrote:
>
> > On Sun, 26 Aug 2007 22:34:15 -0700, Makelei <(E-Mail Removed)>
> > wrote:
> >
> > >Hi,
> > >I have this formulae:
> > >=IF(LEFT($D10,4)="Ext-",SUM(IF(Need!$F$8:Need!$F$21<>"",IF(Need!$G$8:Need!$G$21=RIGHT($D10,LEN($D10)-SEARCH("
> > >",$D10)),IF(Need!$E$8:Need!$E$21<>$B$4,IF(Need!$E$8:Need!$E$21<>$B$3,IF(Need!$E$8:Need!$E$21<>$B$2,IF(Need!$E$8:Need!$E$21<>$B$1,Need!T$8:Need!T$21,0),0),0),0)))),SUM(IF(Need!$F$8:Need!$F$21="",IF(Need!$G$8:Need!$G$21=$D10,IF(Need!$E$8:Need!$E$21<>$B$4,IF(Need!$E$8:Need!$E$21<>$B$3,IF(Need!$E$8:Need!$E$21<>$B$2,IF(Need!$E$8:Need!$E$21<>$B$1,Need!T$8:Need!T$21,0),0),0),0)))))
> > >
> > >I am not able to activate that formula in array {} format. I should be able
> > >to so that I get the right results. It is part of a macro and macro does not
> > >accept that as an array. I have tried to record that, no acceptance. Problem
> > >seems to be in this part:
> > >IF(Need!$G$8:Need!$G$21=RIGHT($D10,LEN($D10)-SEARCH(" ",$D10)
> > >
> > >When activating cell content and with shift+ctrl+enter it will be an array
> > >and will give right results.
> > >
> > >How could I resolve this problem?
> > >Thanks in advance
> > >MakeLei

> >
> > Take a look at HELP for the FormulaArray Property. Your formula will need to
> > use the R1C1 reference style.
> > --ron
> >

 
Reply With Quote
 
Ron Rosenfeld
Guest
Posts: n/a
 
      27th Aug 2007
On Mon, 27 Aug 2007 04:18:00 -0700, Makelei <(E-Mail Removed)>
wrote:

>Hi Ron,
>Thanks for your answer, but:
>"=IF(LEFT(RC4,4)="Ext-",SUM(IF(Need!R8C6:Need!R21C6<>"",IF(Need!R8C7:Need!R21C7=RIGHT(RC4,LEN(RC4)-SEARCH("
>",RC4)),IF(Need!R8C5:Need!R21C5<>R4C2,IF(Need!R8C5:Need!R21C5<>R3C2,IF(Need!R8C5:Need!R21C5<>R2C2,IF(Need!R8C5:Need!R21C5<>R1C2,Need!R8C[14]:Need!R21C[14],0),0),0),0)))),SUM(IF(Need!R8C6:Need!R21C6="",IF(Need!R8C7:Need!R21C7=RC4,IF(Need!R8C5:Need!R21C5<>R4C2,IF(Need!R8C5:Need!R21C5<>R3C2,IF(Need!R8C5:Need!R21C5<>R2C2,IF(Need!R8C5:Need!R21C5<>R1C2,Need!R8C[14]:Need!R21C[14],0),0),0),0)))))"
>Does not work either...
>Problem seems to be in ths bit:
>IF(Need!$G$8:Need!$G$21=RIGHT($D10,LEN($D10)-SEARCH(" ",$D10)
>
>Any proposals?
>
>BR
>MakeLei


There is another potential problem and I don't know how to solve it. (Again,
it would have been easier had you defined "does not work").

At least in excel 2003 and earlier, you cannot pass a formula that is longer
than 255 characters. See http://support.microsoft.com/kb/213181/EN-US/
--ron
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't seem to get my Array formula to work................ Dan the Man Microsoft Excel Misc 3 21st Aug 2008 08:04 PM
array formula does not work Sergio Microsoft Excel Worksheet Functions 5 1st Oct 2006 06:48 PM
Formula or makro help jaroslaw.krolikowski@skanska.pl Microsoft Excel Programming 2 4th Apr 2006 12:25 PM
Will an Array Formula work here? Rob Gould Microsoft Excel Misc 2 1st Feb 2005 01:25 PM
old makro (excel 95) should work with vba-modules Michael Gerstel Microsoft Excel Programming 1 10th Aug 2004 12:32 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:34 PM.