Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Query

Status
Not open for further replies.

djj55

Programmer
Feb 6, 2006
1,761
US
Hello, I did a search and found several threads on this but they did not help.

I need to query worksheet cells A6:C40 for the top 3 values in column C (bringing A and B along), then put these values in A45:C48.

I looked at Data>Import External Data>New Database Query to get to MS Query but it says I do not have a table.

Suggestions???
Thank you,
djj
 



Hi,

You say that you are looking for data in A6:C40.

What is in A1:C5?

MS Query want to see HEADINGS in row 1 and DATA in rows 2 and following.

Skip,

[glasses] [red][/red]
[tongue]
 
you need a named range to use as a table

However, I would suggest a different alternative. simply use the Autofilter and the "Top X" functionality from it. you may then simpy copy the results wherever you wish.

If this needs to be automated, just use the macro recorder to get the code whilst you manually carry out the action.

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Hello,
Thanks for the suggestions/information.
Skip,
This is a fifteen tab workbook that had to mimic what the user had been doing for reports/graphics. The first 5 rows are headings. Thus the MS Query is not what I want for this application but the information is appreciated.
Geoff,
The simple way is the best. I did not think of autofilter but it seems to work.

Thanks to both.
djj
 
This can also be done with formulae, but I would still recommend Autofilter along with Geoff.

Regards,
Zack Barresse

Simplicity is the ultimate sophistication. What is a MS MVP? PODA
- Leonardo da Vinci
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top