Thread: SumIF function
View Single Post
  #3   Report Post  
Domenic
 
Posts: n/a
Default

Assumptions:

Columns A, B, C, and D contain your source table

First row contains the following labels...

B1: Current

C1: 30 Days

D1: 60 Days

Columns G through K contain your result table

Column G, starting with G2, contains your list of codes, TG, PG, SG

H1:K1 contains the following labels...

H1: Count

I1: Current

J1: 30 Days

K1: 60 Days



Formulas:

H2, copied down:

=COUNTIF($A$2:$A$6,G2)

I2, copied down and across:

=SUMIF($A$2:$A$6,$G2,INDEX($B$2:$D$6,0,MATCH(I$1,$ B$1:$D$1,0)))


Hope this helps!


In article ,
"ACDenver" wrote:

I apologize for not making myself clear. I appreciated the response. And
allow me to qualify my original question further. I know I can do a pivot
table and obtain the results, but I am trying to avoid that.

See my example below - the question is how do I do a sumif function within
a summary view when I want to recap hundreds of rows by alpha FERC Codes and
sum associated values within the aging bucket column? I included an excerpt
of 5 records under 4 column headings, and then I show the summary of those
five records below by FERC Code by aging bucket. The countif function worked
when it came to counting the FERC codes, but I am stuck on calculating the
summary values associated to the FERC Code by aging bucket with the sumif
function. This summary section is giving me heartache. Thanks

Detail- Below is an excerpt. But we have hundreds of rows...
FERC Code FERC Current FERC 30 Days FERC 60
TG 10
PG 20
PG 100
SG 300
TG 25
Total 5 10 420 25

This is what I am looking for below as the answer. Can one use the sumif
function to add values by within buckets by a FERC Code?

Count Current FERC 30 FERC 60
TG 2 10 0 25
PG 2 0 120 0
SG 1 0 300 0
Summary 5 10 420 25