How To Extract Values Based On Criteria In Excel

matthewbutterworth

New Member
Joined
Aug 18, 2016
Messages
3
Hi, my brain has turned to blancmange attempting to solve this one on my own. Help is needed, please.

I'm trying to return the column values of rows that have a certain value. I've got close with this. https://www.extendoffice.com/documents/excel/3367-excel-extract-row-that-meet-criteria.html

This is an approximation of my main data sheet.

[TABLE="class: grid, width: 800, align: center"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]E[/TD]
[TD="align: center"]F[/TD]
[TD="align: center"]G[/TD]
[TD="align: center"]H[/TD]
[TD="align: center"]I[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD](The top row is used)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]SOURCE[/TD]
[TD][/TD]
[TD][/TD]
[TD]DATE[/TD]
[TD]MESSAGE[/TD]
[TD]URL[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]twitter[/TD]
[TD][/TD]
[TD][/TD]
[TD]01/11/2017[/TD]
[TD]Message a[/TD]
[TD]www.a.com[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]facebook[/TD]
[TD][/TD]
[TD][/TD]
[TD]02/11/2017[/TD]
[TD]Message b[/TD]
[TD]www.b.com[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]linkedin[/TD]
[TD][/TD]
[TD][/TD]
[TD]03/11/2017[/TD]
[TD]Message c[/TD]
[TD]www.c.com[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]twitter[/TD]
[TD][/TD]
[TD][/TD]
[TD]04/11/2017[/TD]
[TD]Message d[/TD]
[TD]www.d.com[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]twitter[/TD]
[TD][/TD]
[TD][/TD]
[TD]05/11/2017[/TD]
[TD]Message e[/TD]
[TD]www.e.com[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


And this what I would like to return in a separate sheet. In the example below, this is the data that relates to twitter. I would like to hardcode IF=twitter in the formula, rather than referencing a cell. I'll then create separate sheets for linkedin and facebook.


[TABLE="class: grid, width: 800, align: center"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]E[/TD]
[TD="align: center"]F[/TD]
[TD="align: center"]G[/TD]
[TD="align: center"]H[/TD]
[TD="align: center"]I[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]01/11/2017[/TD]
[TD]Message a[/TD]
[TD]www.a.com[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]04/11/2017[/TD]
[TD]Message d[/TD]
[TD]www.d.com[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]05/11/2017[/TD]
[TD]Message e[/TD]
[TD]www.e.com[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Hopefully this explains it well enough for you to understand.

Thank you Forum! Matt.
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
I would use a formula like this, entered with CTRL+SHIFT+ENTER

this can also be solved using "ADVANCED FILTER"

But here,,


Excel 2010
ABCDEF
1(The top row is used)
2SOURCEDATEMESSAGEURL
3twitter01/11/2017Message awww.a.com
4facebook02/11/2017Message bwww.b.com
5linkedin03/11/2017Message cwww.c.com
6twitter04/11/2017Message dwww.d.com
7twitter05/11/2017Message ewww.e.com
8
9
1001-Nov-17Message awww.a.com
1104-Nov-17Message dwww.d.com
1205-Nov-17Message ewww.e.com
Sheet4
Cell Formulas
RangeFormula
A10{=IFERROR(INDEX(D$3:D$7,SMALL(IF($A$3:$A$7="Twitter",ROW($A$3:$A$7)-ROW($A$3)+1),ROWS($1:1))),"")}
B10{=IFERROR(INDEX(E$3:E$7,SMALL(IF($A$3:$A$7="Twitter",ROW($A$3:$A$7)-ROW($A$3)+1),ROWS($1:1))),"")}
C10{=IFERROR(INDEX(F$3:F$7,SMALL(IF($A$3:$A$7="Twitter",ROW($A$3:$A$7)-ROW($A$3)+1),ROWS($1:1))),"")}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top