SOLVED

pulling tax rate from another sheet

%3CLINGO-SUB%20id%3D%22lingo-sub-2396276%22%20slang%3D%22en-US%22%3Epulling%20tax%20rate%20from%20another%20sheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2396276%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%20I'm%20trying%20to%20pull%20the%20tax%20rate%20from%20another%20sheet%20based%20on%20a%20match%20from%20a%20cell%20in%20the%20sheet%20I'm%20working%20from.%20So%20if%20the%20cell%20reference%20is%20found%20in%20the%20other%20sheet%20I%20want%20it%20to%20return%20the%20tax%20rate%20to%20the%20cell%20with%20the%20formula%20in%20it.%20I've%20tried%20XLOOKUP%20and%20Index%2Fmatch%20and%20get%20nothing%20but%20the%20formula%20as%20a%20result.%20I%20don't%20even%20get%20an%20error.%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3DXLOOKUP(IF%20F2%3D'Table%201'!A2%3AD589%2CTable%201'!%2C5)%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EF2%20is%20the%20city%20I%20want%20the%20tax%20rate%20for%3C%2FP%3E%3CP%3EThe%20range%20if%20in%20Table%201%20which%20holds%20city%2C%20county%2C%20tax%2C%20etc%3C%2FP%3E%3CP%3EColumn%205%20is%20where%20the%20tax%20rate%20exists%20in%20Table%201%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20retired%20and%20rusty%2C%20lol.%20Please%20help%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2396276%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2396421%22%20slang%3D%22en-US%22%3ERe%3A%20pulling%20tax%20rate%20from%20another%20sheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2396421%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1065957%22%20target%3D%22_blank%22%3E%40barb72%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAssuming%20the%20data%20is%20converted%20to%20Excel%20Tables%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3DXLOOKUP(%5B%40OrderShipCity%5D%2C%20TaxRateTbl%5BCITY%5D%2C%20TaxRateTbl%5BRATE%5D%2C%22Not%20found%22)%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3Ewill%20at%20least%20give%20a%20result.%26nbsp%3B%20Only%20the%20first%20occurrence%20of%20the%20city%20is%20looked%20up%20and%20some%20cities%20are%20missing.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2396482%22%20slang%3D%22en-US%22%3ERe%3A%20pulling%20tax%20rate%20from%20another%20sheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2396482%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1065957%22%20target%3D%22_blank%22%3E%40barb72%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPerhaps%20you%20mean%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DXLOOKUP(F2%2C'Table%201'!C2%3AC589%2C'Table%201'!D2%3AD589%2C%20%22tax%20not%20found%22)%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi, I'm trying to pull the tax rate from another sheet based on a match from a cell in the sheet I'm working from. So if the cell reference is found in the other sheet I want it to return the tax rate to the cell with the formula in it. I've tried XLOOKUP and Index/match and get nothing but the formula as a result. I don't even get an error.

=XLOOKUP(IF F2='Table 1'!A2:D589,Table 1'!,5)

F2 is the city I want the tax rate for

The range if in Table 1 which holds city, county, tax, etc

Column 5 is where the tax rate exists in Table 1

 

I'm retired and rusty, lol. Please help?

4 Replies

@barb72 

Assuming the data is converted to Excel Tables

=XLOOKUP([@OrderShipCity], TaxRateTbl[CITY], TaxRateTbl[RATE],"Not found")

will at least give a result.  Only the first occurrence of the city is looked up and some cities are missing.

@barb72 

Perhaps you mean

=XLOOKUP(F2,'Table 1'!C2:C589,'Table 1'!D2:D589, "tax not found")
best response confirmed by barb72 (New Contributor)
Solution

@barb72 

Here's a simpler formula that will work

=VLOOKUP(F2,'Table 1'!$C$2:$D$591,2,0)

As noted by Peter and Sergei, though, you have some cities missing from your table, so you'll get an #NA on occasion

 

You also need to convert the format of that cell (the whole column actually) to "number" or "general"--as you posted it, so presumably as you have it, it's formatted as "Text" and then will do exactly what it's been doing, show you your formula as text.

 

Thank you so much!!! That worked. I received the Paypal file from someone else and didn't even think to check the formatting on that column. It seems some of the cities are not in the other file so either Paypal made an error or my friend did when she downloaded it and removed all data except for GA. I'll have her double check it. I don't know where she got the list sheet from either so who knows, lol.

Thanks so much!!!