Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 70
Default sumproduct - strange

=SUMPRODUCT((A5:A504="Permanent")*AY5:AY504)

Colmun A cells can either be blank or hold data in sets of 4 rows i.e.

a1 will be "=con1"
a2 will be either "Permanent", Associate or Contractor
a3 & a4 will empty

this then repeated for next 4 rows etc changing the "=con?" for each set
upto "=con100"

Column AY cells will hold the value of a calculation i.e. "=ad5" or be blank.

In essence what I am doing is totaling the values (ay cells) for each
category of "Permanent", Associate or Contractor

Strange point is that if I have the "Permanent", Associate and Contractor"
listed in the cell before the "=con?" i.e. swap a1 and a2 around cell the
above formula works otherwise no calculation is done?

As ever any questions please ask but many thanks in advance.

Ukman
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default sumproduct - strange

Does this work for you?
=SUMPRODUCT(--(A5:A504="Permanent"),AY5:AY504)


Regards,
Ryan---

--
RyGuy


"UKMAN" wrote:

=SUMPRODUCT((A5:A504="Permanent")*AY5:AY504)

Colmun A cells can either be blank or hold data in sets of 4 rows i.e.

a1 will be "=con1"
a2 will be either "Permanent", Associate or Contractor
a3 & a4 will empty

this then repeated for next 4 rows etc changing the "=con?" for each set
upto "=con100"

Column AY cells will hold the value of a calculation i.e. "=ad5" or be blank.

In essence what I am doing is totaling the values (ay cells) for each
category of "Permanent", Associate or Contractor

Strange point is that if I have the "Permanent", Associate and Contractor"
listed in the cell before the "=con?" i.e. swap a1 and a2 around cell the
above formula works otherwise no calculation is done?

As ever any questions please ask but many thanks in advance.

Ukman

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default sumproduct - strange

Works fine for me but why not just use

=SUMIF(A:A,"Permanent",AY:AY)

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"UKMAN" wrote in message
...
=SUMPRODUCT((A5:A504="Permanent")*AY5:AY504)

Colmun A cells can either be blank or hold data in sets of 4 rows i.e.

a1 will be "=con1"
a2 will be either "Permanent", Associate or Contractor
a3 & a4 will empty

this then repeated for next 4 rows etc changing the "=con?" for each set
upto "=con100"

Column AY cells will hold the value of a calculation i.e. "=ad5" or be
blank.

In essence what I am doing is totaling the values (ay cells) for each
category of "Permanent", Associate or Contractor

Strange point is that if I have the "Permanent", Associate and Contractor"
listed in the cell before the "=con?" i.e. swap a1 and a2 around cell the
above formula works otherwise no calculation is done?

As ever any questions please ask but many thanks in advance.

Ukman



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 70
Default sumproduct - strange

hi,

same result as with mine? I have to list the "Permanet" in the first row for
it to work.

by the way in my example the rows start at A5 not A1 as I menetioned so
formula correct. :)

its so <:? strange...

"ryguy7272" wrote:

Does this work for you?
=SUMPRODUCT(--(A5:A504="Permanent"),AY5:AY504)


Regards,
Ryan---

--
RyGuy


"UKMAN" wrote:

=SUMPRODUCT((A5:A504="Permanent")*AY5:AY504)

Colmun A cells can either be blank or hold data in sets of 4 rows i.e.

a1 will be "=con1"
a2 will be either "Permanent", Associate or Contractor
a3 & a4 will empty

this then repeated for next 4 rows etc changing the "=con?" for each set
upto "=con100"

Column AY cells will hold the value of a calculation i.e. "=ad5" or be blank.

In essence what I am doing is totaling the values (ay cells) for each
category of "Permanent", Associate or Contractor

Strange point is that if I have the "Permanent", Associate and Contractor"
listed in the cell before the "=con?" i.e. swap a1 and a2 around cell the
above formula works otherwise no calculation is done?

As ever any questions please ask but many thanks in advance.

Ukman

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 70
Default sumproduct - strange

hi,

same result as with mine? I have to list the "Permanet" in the first row for
it to work.

In my example I said A1 as first row in fact it is A5 so formula is correct.

any other ideas??//

"Bob Phillips" wrote:

Works fine for me but why not just use

=SUMIF(A:A,"Permanent",AY:AY)

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"UKMAN" wrote in message
...
=SUMPRODUCT((A5:A504="Permanent")*AY5:AY504)

Colmun A cells can either be blank or hold data in sets of 4 rows i.e.

a1 will be "=con1"
a2 will be either "Permanent", Associate or Contractor
a3 & a4 will empty

this then repeated for next 4 rows etc changing the "=con?" for each set
upto "=con100"

Column AY cells will hold the value of a calculation i.e. "=ad5" or be
blank.

In essence what I am doing is totaling the values (ay cells) for each
category of "Permanent", Associate or Contractor

Strange point is that if I have the "Permanent", Associate and Contractor"
listed in the cell before the "=con?" i.e. swap a1 and a2 around cell the
above formula works otherwise no calculation is done?

As ever any questions please ask but many thanks in advance.

Ukman






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 70
Default sumproduct - strange

many thanks for your help but I think I have sorted it.. :)

The value I was totaling was on the top row of the series of 4 and as the
variable i.e. "Permanent" was on the second row of the series it didn't
work... hope that makes sence.


"UKMAN" wrote:

=SUMPRODUCT((A5:A504="Permanent")*AY5:AY504)

Colmun A cells can either be blank or hold data in sets of 4 rows i.e.

a1 will be "=con1"
a2 will be either "Permanent", Associate or Contractor
a3 & a4 will empty

this then repeated for next 4 rows etc changing the "=con?" for each set
upto "=con100"

Column AY cells will hold the value of a calculation i.e. "=ad5" or be blank.

In essence what I am doing is totaling the values (ay cells) for each
category of "Permanent", Associate or Contractor

Strange point is that if I have the "Permanent", Associate and Contractor"
listed in the cell before the "=con?" i.e. swap a1 and a2 around cell the
above formula works otherwise no calculation is done?

As ever any questions please ask but many thanks in advance.

Ukman

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
Strange?! Jo[_2_] Excel Discussion (Misc queries) 6 August 8th 07 07:01 PM
Strange Problem Perry Excel Discussion (Misc queries) 7 April 12th 06 09:52 PM
Strange Problem... Sujesh Excel Discussion (Misc queries) 6 December 30th 05 02:56 PM
Very-2 strange Amiit Mangla Excel Discussion (Misc queries) 4 December 21st 05 12:26 PM
Something Strange ame9 Setting up and Configuration of Excel 2 July 5th 05 10:31 PM


All times are GMT +1. The time now is 06:37 PM.

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"