Filter formula to search on postcode or suburb

jessitarexcel

Board Regular
Joined
Apr 6, 2022
Messages
60
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
  3. Web
Hello,

I really need some help breaking down this formula please :)

I currently have a document that I am working on where I have created a field that allows you to search for the relevant information below by entering in the postcode and the suburb. The screenshot below is a sample of the data type I am working on:

1653979374093.png


The screenshot below shows the search field - at the moment you need to put in the postcode first and then the suburb. You need to fill in both fields to return a result.



Data Information: There are a number of duplicate postcodes as the postcodes often cover mulitple suburbs. There are also a number of suburbs with the same name.

This is the current formula I have: =FILTER(INDEX(Table13,SEQUENCE(ROWS(Table13)),XMATCH(OFFSET(C6, 0, 0, 1, MAX(FILTER(COLUMN(6:6),(6:6<>""), "")) - MIN(FILTER(COLUMN(6:6),(6:6<>""), "")) + 1),Table13[#Headers])),(Table13[POST CODE]=$D$3)*(($D$4=LEFT(Table13[LOCALITY],LEN($D$4)))))

May I ask for some help so that you can put in either the suburb or the postcode and return the same results?

Any assistance is very sincerely appreciated. I can send a file sample if necessary.
 
Last edited by a moderator:

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Try
Excel Formula:
=FILTER(INDEX(Table13,SEQUENCE(ROWS(Table13)),XMATCH(OFFSET(C6, 0, 0, 1, MAX(FILTER(COLUMN(6:6),(6:6<>""), "")) - MIN(FILTER(COLUMN(6:6),(6:6<>""), "")) + 1),Table13[#Headers])),(IF(D3="",1,Table13[POST CODE]=$D$3))*(($D$4=LEFT(Table13[LOCALITY],LEN($D$4)))))
 
Upvote 0
Thank you so much Fluff. I am going to try it now and will let you know how I go.
 
Upvote 0
That was brilliant Fluff, I can see the changes that you have made. I just wasn't sure where to add in the IF part of the formula. It works perfectly now! You have made my day.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,043
Messages
6,122,816
Members
449,095
Latest member
m_smith_solihull

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