Report

M

Michael168

I have a sheet "Sales" which records the transactions.Row 1 is the
header.The records starts from row 2 downward.

Col A2 store date in "dd/mm/yyyy".
Col B2 store invoice number.
Col C2 store group.
Col D2 store machine.
Col E2 store brand
Col F2 store quantity.
Col G2 store unitprice.

I like to generate a report based on month and year against
group,machine & brand.

Currently I am using the array formula in another sheet "Report" to
extract the datas.

e.g. in "Report" col B2 the below array formula :

Range 2:659 is for the month of January,2004

=SUM(IF(Sales!$C$2:$C$659="Filter",IF(Sales!$D$2:$D$659="Cat",IF(Sales!$E$2:$E$659="OEM"1,0))))

Currently there are altogether 10 types of machine and 20 types of
group but the brand is unfix.

Can someone help to do this in vba? I hope I have explain clearly.

Regards
Michael.
 
T

Tom Ogilvy

It is already done for you. (no macro required) Use a Pivot table.
Data=>Pivot Table Reports and Charts. Once created, you can select the date
field and group on Month and Year.
 

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