View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
EricB EricB is offline
external usenet poster
 
Posts: 42
Default Count multiple cells against multiple criteria in an Excel spr

Hi Max

Thank you, formula working fine now.
** If we assume that there are Values in Column 'E', how can I add these
values using data from C & D?**
i.e.
C = Approved
D = Product
E = Value (Say $10.000)
Result = $40.000

I hope this is the last on this subject from me.

Kind regards

EricB

"Max" wrote:

I am getting a #NUM! error on the formula (?)

Check/clear your cols C &/or D for any #NUM! error values (use autofilter to
do this quickly). This is probably the root of the problem.

As for 'Result 2', here's a simple non-array way to extract it dynamically
in adjacent cols to the right of the source data. I'll assume source data in
row 2 down, with the key col = col C (where you have the status, eg:
Approved)

Put in F2: =IF(C2="Approved",ROW(),"")
Leave F1 blank. This is the criteria col.

Put in G2:
=IF(ROWS($1:1)COUNT($F:$F),"",INDEX(A:A,SMALL($F: $F,ROWS($1:1))))
Copy G2 to H2. Select F2:H2, copy down to cover the max expected extent of
data in col C. Minimize/hide away col F. Cols G & H will auto-return only the
lines in cols A and B with "Approved" in col C, with all results neatly
bunched at the top.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"EricB" wrote:
Hi Max
I am getting a #NUM! error on the formula (?)

Then with 'Result 2'. I understand autofilter is the easy way. We are
however working with numerous stats of some 50.000 records per day. A formula
(or two) will be appreciated.

Regards

Eric