Re: Array functions ARGHH!

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Wazooli (Wazooli_at_discussions.microsoft.com)
Date: 03/16/05


Date: Wed, 16 Mar 2005 11:43:01 -0800

Lol - haven't been called Waz since college. Anyway, why do the first
resolve to 0;0;0;...? This seems to me to be a mistake. If the query is
A=1, and B=0, there are 3 in the original data posted. Shouldn't the first
expression resolve to 0;0;1;1;1;0;0;0;0;...?

"Bob Phillips" wrote:

> Waz,
>
> I have replicated what you did and it still works for me. I get lots of 0 0
> entries, because A10-A20 all resolve to 0 0 (that is why my formula tested
> for them), but it works.
>
> The B part resolves to
> {TRUE;FALSE;TRUE;TRUE;FALSE;FALSE;FALSE;FALSE;TRUE;TRUE;TRUE;TRUE;TRUE;TRUE;
> TRUE;TRUE;TRUE;TRUE;TRUE;TRUE}
> for me, or
> {1;0;1;1;0;0;0;0;1;1;1;1;1;1;1;1;1;1;1;1}
> if I use the double unary. Thnis is in cell E2.
> --
>
> HTH
>
> RP
> (remove nothere from the email address if mailing direct)
>
>
> "Wazooli" <Wazooli@discussions.microsoft.com> wrote in message
> news:F95098D0-7A03-4F98-B991-F9781903654F@microsoft.com...
> > I used A1:B20 because JulieD suggested those. I merely filled in to
> complete
> > the ranges. If my table is D1:I6, with cell D1 being empty (the numbering
> > starts beneath and to the right), and I enter
> > =SUMPRODUCT(--($A$1:$A$20=$D2),--($B$1:$B$20=E$1), filldown and then to
> the
> > right, I get all zeroes. When I look at how Excel evaluates the formula,
> I
> > can verify that the '--' is working, but the values for the first part of
> the
> > expression resolve to '0;0;0;0;...' The second part is correct.
> >
> >
> >
> > "Bob Phillips" wrote:
> >
> > > It does!
> > >
> > > I just followed Domenic's instructions and it worked perfectly for me.
> > >
> > > Where does A20 and B20 com e into it in your reply?
> > >
> > > --
> > >
> > > HTH
> > >
> > > RP
> > > (remove nothere from the email address if mailing direct)
> > >
> > >
> > > "Wazooli" <Wazooli@discussions.microsoft.com> wrote in message
> > > news:961E39CA-19A1-409C-9CFB-415813609DB2@microsoft.com...
> > > > Doesn't. When I look at how Excel evaluates the formula, it seems to
> have
> > > a
> > > > problem with $A$20 representing the first range. The sumproduct
> function
> > > > gives all zeroes. The range $B$20, on the other hand, presents no
> > > problem.
> > > >
> > > > wazooli
> > > >
> > > >
> > > > "Domenic" wrote:
> > > >
> > > > > Assumptions:
> > > > >
> > > > > 1) Sheet1 contains your source table
> > > > >
> > > > > 2) the first row in Sheet2 contains your numbers (0 through 4)
> starting
> > > > > at B1
> > > > >
> > > > > 3) the first column in Sheet2 contains your other set of numbers (0
> > > > > through 4) starting at A2
> > > > >
> > > > > Formula:
> > > > >
> > > > > Sheet2!B2, copied across and down:
> > > > >
> > > > > =SUMPRODUCT(--(Sheet1!$A$1:$A$9=$A2),--(Sheet1!$B$1:$B$9=B$1))
> > > > >
> > > > > Hope this helps!
> > > > >
> > > > > In article <Xns961B6DF502D66marcfleurysympaticoc@207.35.177.134>,
> > > > > Marc Fleury <marcfleury@sympatico.ca> wrote:
> > > > >
> > > > > > I'm pretty sure I need an array function for this, but nothing I
> do
> > > > > > works.
> > > > > >
> > > > > > My data is basically two colums:
> > > > > >
> > > > > > A B
> > > > > > 0 0
> > > > > > 0 2
> > > > > > 1 0
> > > > > > 1 0
> > > > > > 1 4
> > > > > > 2 1
> > > > > > 3 3
> > > > > > 3 3
> > > > > > 4 0
> > > > > >
> > > > > > etc
> > > > > >
> > > > > > Now, I need to create a table that counts how many instance of
> each
> > > pair
> > > > > > there are. Like so:
> > > > > >
> > > > > > 0 1 2 3 4
> > > > > > ___________
> > > > > > 0 |1 0 1 0 0
> > > > > > 1 |2 0 0 0 1
> > > > > > 2 |0 1 0 0 0
> > > > > > 3 |0 0 0 2 0
> > > > > > 4 |1 0 0 0 0
> > > > > >
> > > > > >
> > > > > > So the upper left cell counts how many times there is a 0 in
> column A
> > > > > > AND a 0 in colum B (once). The next cell to the right counts how
> many
> > > > > > times there is a 0 in column A and a 1 in colum B (zero times).
> Etc.
> > > > > >
> > > > > > The closest that I have come is
> > > > > >
> > > > > > {=SUM(IF(($A$1:$A$10=0)+($B$1:$B$10=0),1,0))}
> > > > > >
> > > > > > I actually have reference cells for the "0" that's being compared
> to,
> > > so
> > > > > > that I can use the same formula for every cell in the table, but I
> > > know
> > > > > > how to do that part.
> > > > > >
> > > > > > The problem with this formula is that it counts how many times
> there
> > > is
> > > > > > a zero in column A OR a zero in column B.
> > > > > >
> > > > > > HELP!
> > > > > >
> > > > > > --
> > > > > > Marc.
> > > > >
> > >
> > >
> > >
>
>
>



Relevant Pages

  • Cant access to numerial fields using adoquery ...
    ... I have posted this message before in several delphi news boards but never ... got any answer to resolve the problem. ... The following query works fine: ... ADOQuery1.Open; //Generates error message ...
    (comp.lang.pascal.delphi.misc)
  • Re: Multi-home machine showing up twice on dns server
    ... Make sure netmask ordering is enabled. ... Then you will correctly resolve the server's IP address on the local subnet of the machine making the DNS query. ... If you disable it and netmask ordering is enabled, a query for server01 from a computer who's address is 10.1.23.105 will be resolved to 10.1.1.1. ...
    (microsoft.public.win2000.dns)
  • Re: too few parameters 5 expected
    ... You cannot use OpenRecordset on a query with parameters, ... This is because the recordset is being opened not by Access, ... If you are opening a recordset on a saved parameter query, you can resolve ... Dim rs as DAO.Recordset ...
    (microsoft.public.access.formscoding)
  • Re: Turn off Messages at bottom of display
    ... To the query, any name it cannot resolve is a parameter. ... and in some cases they were queries of queries and the second ... Service to resolve the parameter, so you do not get the Parameter ... The ES is not available to resolve these references for the Execute ...
    (microsoft.public.access.modulesdaovba)
  • Re: My own DNS resolver
    ... but only name servers or authorities. ... How can I resolve this query? ... The DNS server sends me no answer fields, ...
    (comp.unix.programmer)