Conducting Calculations based on Autofiltered Data

farmertml

Board Regular
Joined
Jun 16, 2005
Messages
62
Hi there.

I have a large number of data which I have autosorted based on two variables (Grower and Variety). What I want to achieve is to take the total "number of items" and "percentage rejections" (two other variables) from the autofiltered data, and copy and paste it into another sheet (to conduct further calculations).

The other problem I will then have is I need to it be as automated as possible as there are at least 10 varieties for each grower which I will need pasting onto the same sheet.

For example if Grower1 has Three products, "Chocolate" and "Marshmallows" and "Honey", I want to automatically sort my "SheetA" data by each of the variables independantly and then copy the "number of items" and "Percentage rejections", onto my second sheet "SheetB", one after the other.


I know the VB to select the autofilter critera :

Sub Filter1()
Selection.AutoFilter Field:=1, Criteria1:="Grower1"
Selection.AutoFilter Field:=4, Criteria1:="Marshmallows"
End Sub

But obviously there is alot more to this and it's quite complicated.

Any help would be REALLY appreciated as I'm tearing my hair out at the moment.
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Forum statistics

Threads
1,203,523
Messages
6,055,896
Members
444,832
Latest member
Kauri

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top