Sort using PT or VBA

C

Carl Gentry

I have a table of data. I want to pull one column of data below the
table to sort and use to create a chart. I also want to be able to
select the rows of data included in the sorted table to be graphed.

I have been using a pivot tableto select the rows and to
automatically(updated with the change event with VBA) sort the data.
However since a PT is usually used to summarize data not just sort, it
sums or averages the numbers therefore putting the limitation of not
having duplicates.

I am using the index and match functions to link the sorted data to the
table above.

I tried to just sort the data with VBA however the index/match function
and the list boxes get mixed up when sorted.

Any solutions with the sort or the PT would be appreciated. Is it
possible to just pull numbers with a PT, I just want to sort the
numbers.

Using Excel 2003

Carl
 
C

carl.gentry

I solved this myself. I had the tab name in the lookup_value in the
Match function. After removing the tab name it works. Seems like a
bug to me!

Carl

ColB C D
A 1 20
B 2 2
C 3 100
D 4 9
E 5 10

B 2
D 9
E 10
A 20
C 100


This one does not work
=INDEX(B$2:D$6,MATCH(Sheet1!$B15,B$2:B$6,0),3)

This one works!
=INDEX(B$2:D$6,MATCH($B15,B$2:B$6,0),3)
 

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