Formula that works like a data filter

rfinnegan

Board Regular
Joined
Mar 15, 2005
Messages
173
Office Version
  1. 365
Platform
  1. Windows
Hi All:

I have a file with about 2000 lines of data. In column A is the customer ID. Also in column A is the customer ID with the word 'Total". So if the customer has 3 invoices, It will show his customer ID in three rows, then the fourth row will be his ID + "total".
So:
Jack1
Jack1
Jack1
Jack 1 Total

I can filter for these lines using the 'Text Filter' and 'Contains', then 'Total" , but was wondering if there is a formula that would also accomplish this. In those 2000 lines are about 120 lines that I'm searching for with the word 'Total'. The solution I'm looking for finds the first instance of the word and drops it in row 1, then finds the second instance and drops it in row 2, even if the second instance is 30 rows away from the first instance.

Thanks in advance for any help.
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
Thanks for updating your profile, but it would have helped if you had let me know. ;)
How about
Excel Formula:
=FILTER(A2:A10000,ISNUMBER(SEARCH("total",A2:A10000)))
 
Upvote 0
Another option would be

Excel Formula:
=FILTER(A2:A10000,RIGHT(A2:A10000,6)=" Total")

Probably highly unlikely but this one ensures space and total is at the end, just in case total could be part of a customer id as well.
 
Upvote 0

Forum statistics

Threads
1,214,416
Messages
6,119,386
Members
448,891
Latest member
tpierce

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