Filter Array Data using Formulas

Pc1x1

New Member
Joined
Apr 26, 2011
Messages
34
Hi Guys, I didn't find exactly what I was looking for, and maybe you can help.

Basically I have a document with thousands of lines of data. The data is organized across per row.

Columns; A, B, C, D, E, F, G.

A: Has a Name, we'll call it "Apple"

My array is from A2:G2000

Example:
ABCDEFG
Apple10/24Crate Lot 1AX1CACA$35
Apple10/24Create Lot 2AX1MDMD$35
Pear10/26Box 1AX1FLFL$15
Apple10/24Create Lot 7AX1IAIA$10
Banana10/28Packet 1BX1TXTX$15
Banana10/22Packet 5BX1CACA$10
... So on so forth for 2000 lines

<tbody>
</tbody>
I'd like to create a formula that going down, will search the entire array from A2 to G2000,

And If I search for "Apple" and go down and organize the rows together. Then I'd do the same thing for Pear, Banana etc.

So If I was searching for "Apple" using the data above my output would need to be;


Apple 10/24 Crate Lot 1 AX1 CA CA $35
Apple 10/24 Create Lot 2 AX1 MD MD $35
Apple 10/24 Create Lot 7 AX1 IA IA $10

It will output in order, going down.

Hopefully this makes sense.


My Current Low Tech Solution:
Filter by "Apple" on Column A, then copy and paste the filtered values into the sheet.
Same thing for Pear, Banana etc.

I'd like to automate the process a bit further.

Thanks!
 
Last edited:

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
@Pc1x1, maybe I'm missing something, but can't you just select the entire range of data and then use Filter & Sort > Custom Sort on Column A, Ascending?

Or you could format the entire range (including headers) as a table and then sort using the filter dropdown on Column A.
 
Last edited:
Upvote 0
@Pc1x1, maybe I'm missing something, but can't you just select the entire range of data and then use Filter & Sort > Custom Sort on Column A, Ascending?

Or you could format the entire range (including headers) as a table and then sort using the filter dropdown on Column A.

Hi Erik, correct, that is my current solution to the problem, however that makes me have to paste the results as values in another sheet, whereas if I could use a formula, it could be automated.

So it's not like I don't have a way to reach my goal, I'd just like a better way.

Thanks!
 
Upvote 0
@Pc1x1, I must not be clear on what you're trying to do. Sorting is "permanent" if you want it to be. Why are you needing to copy it to another sheet, if you can permanently rearrange it on the first sheet? Are you saying that you're trying to create a different sheet for each unique item name from Sheet 1 Column A?
 
Upvote 0
Because the data is from an output and is dynamic it changes every day. Theres alot of formulas and formatting that goes on. So on the actual output, or in the case I sort at a specific time, I do so on another sheet not to interfer with the raw data.
 
Upvote 0

Forum statistics

Threads
1,215,646
Messages
6,125,997
Members
449,279
Latest member
Faraz5023

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