Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 24
Default Think I need an Array; not sure

I think I need an Array to get what I want, but I'm not sure how to write it.
I get part way then am at a loss. Worksheet is formatted as:

A: First Name
B: Last Name
C: Badge #
D-Z: [dates & hours worked calculations]
AA: MORE THAN 5 HRS (with IF calculations resulting in "1" for true or "0"
for false)
AB: LESS THAN 10 HRS (with IF calculations resulting in "1" for true or "0"
for false)
AC to AI: (similar hours increments)

Employee #1 has 8 rows of data due to the dates he worked (A2:A9), employee
#2 has 21 rows of data (A10:A30), employee #3 (A31:A 111)

I need to count how many times "1" appears in AA2:AA9 for employee #1,
number of times "1" appears in AA10:AA30 for employee #2, etc.

Is it an Array that I really need or something else? Thanks for any help
one can provide.
--
heyredone
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,805
Default Think I need an Array; not sure

=SUMPRODUCT(--(C1:C1000=C1),--(AA1:AA1000=1))

will give you the sum of those cells in AA1:AA1000 which have 1 in them and
in the same row Col C equals the value in C1...

In other words it will sum Col AA for the rows for employee# 1 if C1
contains 1...

Genral form is
=SUMPRODUCT(--(rng1=cond1),--(rng2=cond2),(rng3))

rng1, 2, and 3 have to be of same size..
-- converts the TRUE to matches to 1 and FALSE to 0 so it essentially
multiples rng1 (1 or 0) with rng2 (1 or 0) and rng3 (actual value) and sums
up.

As you must have realized if you have -- in front of all conditions it acts
as COUNIF
and if you don't have it front of one set it acts as SUMIF...


"heyredone" wrote:

I think I need an Array to get what I want, but I'm not sure how to write it.
I get part way then am at a loss. Worksheet is formatted as:

A: First Name
B: Last Name
C: Badge #
D-Z: [dates & hours worked calculations]
AA: MORE THAN 5 HRS (with IF calculations resulting in "1" for true or "0"
for false)
AB: LESS THAN 10 HRS (with IF calculations resulting in "1" for true or "0"
for false)
AC to AI: (similar hours increments)

Employee #1 has 8 rows of data due to the dates he worked (A2:A9), employee
#2 has 21 rows of data (A10:A30), employee #3 (A31:A 111)

I need to count how many times "1" appears in AA2:AA9 for employee #1,
number of times "1" appears in AA10:AA30 for employee #2, etc.

Is it an Array that I really need or something else? Thanks for any help
one can provide.
--
heyredone

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
Prevent cell/array references from changing when altering/moving thecell/array nme Excel Discussion (Misc queries) 1 September 19th 08 01:53 PM
Populate an array that is a subset of a larger array? Jeff Excel Worksheet Functions 1 September 25th 07 12:51 AM
meaning of : IF(Switch; Average(array A, array B); array A) DXAT Excel Worksheet Functions 1 October 24th 06 06:11 PM
combining cells and array from different sheets into an array to pass to IRR() [email protected] Excel Discussion (Misc queries) 3 September 11th 06 07:17 AM
Goal Seek On Members of an Array within Array LostInVBA Excel Worksheet Functions 1 June 27th 05 11:01 PM


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