I have a search for ZIP codes which looks up at a google sheet for entries.
But when I enter in the search field a ZIP code with a leading 0 nothing will be returned.
The google sheet has format for '0000' digits so that 04325 will be displayed correct.
This means the actual value (e.g. 4325) will be returned. All google sheets is doing is formatting for display in google sheets.
You would need to store your zip codes on google sheets as strings. Place an apostrophe before each zip code (e.g. '04325)
A rather long winded workaround would be to use a google apps script to return DisplayValues as an array, then you could search for the zip codes with leading zeros
Hello, thank you for your commen.
When I add '09999 the vale will not be found with the search.
Do I have to change something at the input field (for the seared number) as well?
Is it possible that within my TB_input TextBox the leading 0 get lost on the way to googlesheets.?
Displaying the 0 in the sheets is also no option as the 'only displayed' 0 (as unser format) will be ignored in the search.
Formating the ZIP as Text with '04103 has the effect the the googlesheet search can find it, which is basically good.
I belive I copied now all 3 related blocks:
In google apps script, if you are getting a set of data from a range, you can use getValues() to get the actual values (underlying values) on your spreadsheet. If you use getDisplayValues() instead, the script will get the values that you see on the sheet - the formatted values.