FILTER formula based on field with numbers and text formats

Excel Novice 1

New Member
Joined
Jan 2, 2024
Messages
7
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Hi,

I have a list of Product and Location numbers and want to display a list of unique Product numbers that start with the number 8 at a subset of locations (from list). My first approach was to use a FILTER formula nested within a UNIQUE formula and set the filter criteria to a list of the locations that I want to display. However, I'm facing a challenge since the location identifiers contain a mix of numbers and text and I can't figure out how to get the Filter function to work with both formatting types in the same column.

I am thinking that the addition of an intermediary step may help. The step would indicate if the location code is in the location list using "1"/"0" and would be a way to convert the column with number/text formatting to just number formatting. Then I can run the filter formula off the new column. However, I wanted to check if there was a way to do this without the intermediary step.

Example dataset:
Book1
BCDEFGHI
3Product IDLocation IDLocations to includeProduct ID to includeExpected result
485221852852Start with 8 only85221
535440115C22384524
685325A35411589638
784524852
889638C223
996529115
1033544115
1133547A354
1284524852<<duplicate
1389638C223<<duplicate
Sheet1
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
text.xlsx
ABCDEFGH
3Product IDLocation IDLocations to includeProduct ID to includeExpected result
485221852852Start with 8 only85221
535440115C22384524
685325A35411589638
784524852
889638C223
996529115
1033544115
1133547A354
1284524852<<duplicate
1389638C223<<duplicate
Sheet8
Cell Formulas
RangeFormula
H4:H6H4=UNIQUE(FILTER(A4:A13,COUNTIF(D:D,B4:B13)*(LEFT(A4:A13,1)="8")))
Dynamic array formulas.


If your Office Version is 365, it would be more convenient than 2010...
 
Upvote 0

Forum statistics

Threads
1,215,086
Messages
6,123,033
Members
449,092
Latest member
ikke

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