• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Extracting data based on criteria

jb

Member
Hi all experts,
I have a data file with 1140 rows and 5 columns namely sr. no, T (means type), S (means gender), A (means area) and score.

T column has only 2 possible values - G or P
S column has only 2 possible values - M or F
A column has only 2 possible values - U or R

Now, I want to extract data based on some fixed criteria and I want to fill the data on a different worksheet. My fixed criteria are:
1. All rows having value M or F in S column
2. All rows with value F in S column and G or P in T column
3. All rows with value U in A column and G or P in T column .......

Note: It is sure that criteria include selection from 1 or 2 columns. There is no such criteria in which selection will be from all 3 columns.
for e.g all rows with M in S column, G from T column and U from A column.
 

Attachments

  • extract.xlsx
    39.8 KB · Views: 7
By the sounds of it a pivot table would sort your problem.

See your file uploaded with a pivot table attached.

For your example 3. U is in the report filter, then T shows all the Gs then all the Ps. You can filter these too if you have more data.

Just change the filters if you want other criteria or add another pivot table if you need to show both sets of criteria.

Hope that helps.
Alexis
 

Attachments

  • extract with pivot.xlsx
    73.5 KB · Views: 4
Back
Top