Double Vertical Lookup

Tennisguuy

Well-known Member
Joined
Oct 17, 2007
Messages
564
Office Version
  1. 2016
Platform
  1. Windows
I can do a regular vertical lookup but not quite sure how to do a double vertical lookup. I need to look up the state and then the county within my table to find the correct deductible. The lookup value for the state is in cell A12 and the lookup value for the county is in cell A13. The data is in cell K12:N500. The state is in column K, location is in column L, county column M and deductible column N
 
I manually typed over all of the counties. However the formula is not working for all states. It works for all of Alabama but after that I get 0 for the deductible.
 
Upvote 0

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
I manually typed over all of the counties. However the formula is not working for all states. It works for all of Alabama but after that I get 0 for the deductible.

Ken,

Your data seems to have problems...

1) I'm not happy with the manual solution. The web sites has a character that koks like a space. In Excel it is a character with the code 160. if I were you I.d run the TrimAll macro on your data. You can find this macro on this board or via Google.

2) The after Alabama problem. Does this also occur with the control+shift+enter:

=IFERROR(INDEX($N$2:$N$100,MATCH(A13,IF($K$2:$K$100=A12,$M$2:$M$10),0)),0)

If it does, that could still mean the data is no clean. Try again after running the TrimAll macro.
 
Upvote 0
I never heard of trim all macro. How do you do that. If I manually typed over the data would the erase anything that was previously copied or entered in the cell
 
Upvote 0
Aladin thanks for all your help. I click on the link and unfortunately I'm not understanding how to perform the TRIM data work. Again thanks but I think I am just going to stop trying to figure out how to get this to work. Ken.
 
Upvote 0
Oh forgot to mention I tried a couple of the sumifs and sumproduct formulas listed in the thread and they both worked about 90% of the time correctly. However as I was testing all a couple of times the deductible wouldn't change when I entered a different state or county.

These are the ones I used:

SUMIFS('Wind Deductible Chart'!D3:D1822,'Wind Deductible Chart'!A3:A1822,Sheet1!C7,'Wind Deductible Chart'!C3:C1822,Sheet1!D7)

SUMPRODUCT(('Wind Deductible Chart'!A3:A1822=C7)*('Wind Deductible Chart'!C3:C1822=Sheet1!D7)*('Wind Deductible Chart'!D3:D1822))
 
Upvote 0
Aladin thanks for all your help. I click on the link and unfortunately I'm not understanding how to perform the TRIM data work. Again thanks but I think I am just going to stop trying to figure out how to get this to work. Ken.

The TrimAll code "should be copied to the standard code module which can be accessed by pressing Alt + F11. To run code from the Excel window, press Alt + F8, double click macro name".

Another option is to use ASAP Utilities.
 
Upvote 0
Thanks that didn't work either . Going to give this one more last try. I am going to rearrange my data setup so that the normal index & match works.
 
Upvote 0
Is there a way to determine if a value is enter twice in a column
 
Upvote 0

Forum statistics

Threads
1,215,151
Messages
6,123,316
Members
449,094
Latest member
Chestertim

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