Sum, Average, and Count from imported .txt file

S

sdhi

I must import a large text file with one record for each transaction, then
grab all transactions of the same type within a data range. This I can do.

But within this group I also need to then break into sub groups based on
value ranges (1-10,11-20, etc) and then to count the number of transactions
and average the value of all transactions within each subgroup.

I think I need to keep each record in each subgroup somewhere then do the
averaging and then record the count and average for each subgroup on a
report.

I'm new to excel so any help would be appreciated!
 
J

JBeaucaire

I think you will need some sort of COUNTIF() or SUMPRODUCT() formula. You
don't provide any details about the layout of your sheet, so generically...

Column A - values you want to filter by

=COUNTIF(A:A,">=1") - COUNTIIF(A:A,">10")
=SUMPRODUCT(--(A1:A1000>=1),--(A1:A1000<=10))

Something like that. Does that get you started?

More reading on Sumproduct():
http://www.xldynamic.com/source/xld.SUMPRODUCT.html#classic
 
A

Ashish Mathur

Hi,

You may create a pivot table. Drag the values column to the row area and
transactions to the data area. Now click on any cell in the row area and go
to pivot table drop down on the pivot table toolbar. Select Group and Show
detail > Group. Fill in the required input.

Hope this helps.

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top