Creating a summary from existing spreadsheet data ...

N

NP

Looking for a solution to this little problem in Excel ...

Cells A1 to C7 contain the main data. What I would like to do is select all
of the items with a Condition of A and place them in a little summary as
shown in A9 to C12. Any ideas how to automate this please?

Many thanks,

NP.

Spreadsheet:

A B C
1 Pt No. Desc Condition
2 1 Apple A
3 2 Pear A
4 3 Banana B
5 4 Orange A
6 5 Grape C
7 6 Sultana B
8
9 Pt No. Desc Condition
10 1 Apple A
11 2 Pear A
12 4 Orange A
 
J

JE McGimpsey

One way:

Record a macro doing an advanced filter.

With a little editing, I got

Public Sub AutoFilterAs()
Range("C1").Copy Range("E1")
Range("E2").Value = "A"
With Range("A1").CurrentRegion
.AdvancedFilter _
Action:=xlFilterCopy, _
CriteriaRange:=Range("E1:E2"), _
CopyToRange:=.Offset(.Rows.Count + 2, 0).Resize(1, 1), _
Unique:=False
End With
Range("E1:E2").ClearContents
End Sub

See

http://www.contextures.com/xladvfilter01.html

for more help.
 
P

Paul Corrado

NP

I don't think I understood your question correctly when I posted my reply.

Frank has a better answer
 
T

Tom Ogilvy

copy the data to a new worksheet

Sort on the third column

Put in some rows to separate the data.

After you sort, you can select the data and do

Data=>Subtotals
select the third column and count
 

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