Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
=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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Prevent cell/array references from changing when altering/moving thecell/array | Excel Discussion (Misc queries) | |||
Populate an array that is a subset of a larger array? | Excel Worksheet Functions | |||
meaning of : IF(Switch; Average(array A, array B); array A) | Excel Worksheet Functions | |||
combining cells and array from different sheets into an array to pass to IRR() | Excel Discussion (Misc queries) | |||
Goal Seek On Members of an Array within Array | Excel Worksheet Functions |