ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Query in Excel (https://www.excelbanter.com/excel-programming/273501-query-excel.html)

Query in Excel

Query in Excel
 
Query in Excel

| A B C
----------------------------
1 | Name Age Sex
2 | One 21 M
3 | Two 22 F
4 | Three 23 M
5 | Four 34 F
6 | Five 25 F
7 | Six 26 F
8 | Seven 27 F
9 | Eight 28 M
10| Nine 29 M
11| Ten 30 M


Following example is an miniature of my actual problem.

Is there a way to create a query in Excel by which I can
obtain a list containing the Name and sex of all the
people whose age is greater than 24. I can do it by
exporting to Access , then Create a query and then export
the query results to excel. Is there a way to create a
query directly in Excel and obtain the results.

Thanks
Manik

Manik

Query in Excel
 
Thank you very much. Sir.
I just fell in love with Excel after seeing the simple
solution. Just curious.,
1. what are "table" in excel and how can I create them.
2. what are "querries" in excel and how can I create them.

-----Original Message-----
Query in Excel wrote:

Query in Excel

| A B C
----------------------------
1 | Name Age Sex
2 | One 21 M
3 | Two 22 F
4 | Three 23 M
5 | Four 34 F
6 | Five 25 F
7 | Six 26 F
8 | Seven 27 F
9 | Eight 28 M
10| Nine 29 M
11| Ten 30 M


Following example is an miniature of my actual problem.

Is there a way to create a query in Excel by which I

can
obtain a list containing the Name and sex of all the
people whose age is greater than 24. I can do it by
exporting to Access , then Create a query and then

export
the query results to excel. Is there a way to create a
query directly in Excel and obtain the results.

Thanks
Manik


One way of doing this is using the Data | Filter |

AutoFilter command.
It will allow you to filter your list based upon

differing criteria.
This is done in-place by Excel automatically hiding non-

matching rows.
It would allow you to copy and paste to other areas of

your workbook.
To do 'Age 24' you will need to use a 'Custom...'

criteria.

Does that work for your needs?

Regards,

Matthew Connor

.


Matthew Connor

Query in Excel
 
Manik wrote:
Thank you very much. Sir.
I just fell in love with Excel after seeing the simple
solution. Just curious.,
1. what are "table" in excel and how can I create them.
2. what are "querries" in excel and how can I create them.

Tables really apply to databases(Access) not spreadsheets (Excel).

You can lay out a block of columns and rows just like a database
Table. But there isn't a set of table definitions like you would have
in a database. All you have to do is make a block of data - often with
the first row being the column names.

Queries (using SQL as a means to select and return data) isn't
something normally done in Excel. AutoFilter is one way of doing it.
PivotTables is another.

There is a few ways of using SQL to pull in data from external
sources. I'm not an expert at those - check out Data | Import External
Data to do that.

Regards,

Matthew Connor


-----Original Message-----
Query in Excel wrote:


Query in Excel

| A B C
----------------------------
1 | Name Age Sex
2 | One 21 M
3 | Two 22 F
4 | Three 23 M
5 | Four 34 F
6 | Five 25 F
7 | Six 26 F
8 | Seven 27 F
9 | Eight 28 M
10| Nine 29 M
11| Ten 30 M


Following example is an miniature of my actual problem.

Is there a way to create a query in Excel by which I


can

obtain a list containing the Name and sex of all the
people whose age is greater than 24. I can do it by
exporting to Access , then Create a query and then


export

the query results to excel. Is there a way to create a
query directly in Excel and obtain the results.

Thanks
Manik


One way of doing this is using the Data | Filter |


AutoFilter command.

It will allow you to filter your list based upon


differing criteria.

This is done in-place by Excel automatically hiding non-


matching rows.

It would allow you to copy and paste to other areas of


your workbook.

To do 'Age 24' you will need to use a 'Custom...'


criteria.

Does that work for your needs?

Regards,

Matthew Connor

.




All times are GMT +1. The time now is 05:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com