A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
This might be a data type mismatch. LEFT(Q19,5) returns text. If the ZipCode column in TAXRATES_ZIP5_KY202605!B:B contains numeric values (42355 stored as a number), then Excel will not find a match between text "42355" and number 42355 when using an exact-match VLOOKUP.
Test this by checking:
=ISNUMBER(LEFT(Q19,5))
This should return FALSE because LEFT returns text. If the tax table ZIP codes are numeric, convert the LEFT result to a number:
=VLOOKUP(VALUE(LEFT(Q19,5)),TAXRATES_ZIP5_KY202605!B:D,3,FALSE)
or
=VLOOKUP(--LEFT(Q19,5),TAXRATES_ZIP5_KY202605!B:D,3,FALSE)
If the tax table ZIP codes are stored as text, keep the LEFT result as text and verify the lookup column is also text:
=VLOOKUP(LEFT(Q19,5),TAXRATES_ZIP5_KY202605!B:D,3,FALSE)
You can determine the data type in the tax table with:
=ISNUMBER(B2)
where B2 contains 42355.
Another possibility is that the ZIP+4 value in Q19 is actually stored as a number. If Q19 contains the numeric value 423559610, then:
=LEFT(Q19,5)
returns "42355", but you may be better off extracting the ZIP numerically
=VLOOKUP(INT(Q19/10000),TAXRATES_ZIP5_KY202605!B:D,3,FALSE)
Also verify that the ZIP code is truly in column B of the lookup range. In your description the table columns appear to be:
A: State
B: ZipCode
C: TaxRegionName
D: EstimatedCombinedRate
If so, your formula should return column 3 of the range B:D, which is the tax rate in column D. That part is correct. A quick diagnostic is
=MATCH(VALUE(LEFT(Q19,5)),TAXRATES_ZIP5_KY202605!B:B,0)
If this returns a row number, the ZIP exists and the issue is elsewhere. If it returns #N/A, the values are not identical from Excel's perspective, usually due to text-vs-number storage.
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin