vlookup with multi name range

inactiveUser214710

Board Regular
Joined
Apr 27, 2012
Messages
171
Code:
  [TABLE]
<colgroup><col style="mso-width-source:userset;mso-width-alt:1080;width:23pt" width="30">  <col style="mso-width-source:userset;mso-width-alt:568;width:12pt" width="16">  <col style="mso-width-source:userset;mso-width-alt:3100;  width:65pt" width="87" span="6">  <col style="mso-width-source:userset;mso-width-alt:1336;width:28pt" width="38">  <col style="mso-width-source:userset;mso-width-alt:2787;width:59pt" width="78">  <col style="mso-width-source:userset;mso-width-alt:1052;  width:22pt" width="30" span="2">  <col style="mso-width-source:userset;mso-width-alt:3811;width:80pt" width="107">  <col style="width:48pt" width="64" span="5">  </colgroup><tbody>[TR]
   [TD="class: xl66, width: 30"]1[/TD]
   [TD="class: xl66, width: 16"][/TD]
   [TD="class: xl66, width: 87"]C[/TD]
   [TD="class: xl66, width: 87"]D[/TD]
   [TD="class: xl66, width: 87"]E
[/TD]
   [TD="class: xl66, width: 87"]F
[/TD]
   [TD="class: xl66, width: 87"]G[/TD]
   [TD="class: xl66, width: 87"]H[/TD]
   [TD="class: xl66, width: 38"]I[/TD]
   [TD="class: xl66, width: 78"]J[/TD]
   [TD="class: xl66, width: 30"]K[/TD]
   [TD="class: xl66, width: 30"]L[/TD]
   [TD="class: xl66, width: 107"]M[/TD]
   [TD="width: 64"][/TD]
   [TD="width: 64"][/TD]
   [TD="width: 64"][/TD]
   [TD="width: 64"][/TD]
   [TD="width: 64"][/TD]
  [/TR]
  [TR]
   [TD="class: xl66"]2[/TD]
   [TD="class: xl66"][/TD]
   [TD="class: xl71, colspan: 2"]Fruits[/TD]
   [TD="class: xl67, colspan: 2"]Vegestables[/TD]
   [TD="class: xl69, colspan: 2"]Dry Fruits[/TD]
   [TD][/TD]
   [TD="class: xl72"]almonds[/TD]
   [TD][/TD]
   [TD][/TD]
   [TD="class: xl73, align: center"]#N/A[/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
  [/TR]
  [TR]
   [TD="class: xl66"]3[/TD]
   [TD="class: xl66"][/TD]
   [TD="class: xl70"]apple[/TD]
   [TD="class: xl70"]aaFruit[/TD]
   [TD="class: xl65"]brokeli[/TD]
   [TD="class: xl65"]ddVegt[/TD]
   [TD="class: xl68"]almonds[/TD]
   [TD="class: xl68"]ggDry[/TD]
   [TD][/TD]
   [TD]question[/TD]
   [TD][/TD]
   [TD][/TD]
   [TD]answer[/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
  [/TR]
  [TR]
   [TD="class: xl66"]4[/TD]
   [TD="class: xl66"][/TD]
   [TD="class: xl70"]grapes[/TD]
   [TD="class: xl70"]bbFruit[/TD]
   [TD="class: xl65"]onions[/TD]
   [TD="class: xl65"]eeVegt[/TD]
   [TD="class: xl68"]raisins[/TD]
   [TD="class: xl68"]hhDry[/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
  [/TR]
  [TR]
   [TD="class: xl66"]5[/TD]
   [TD="class: xl66"][/TD]
   [TD="class: xl70"]banana[/TD]
   [TD="class: xl70"]ccFruit[/TD]
   [TD="class: xl65"]carrots[/TD]
   [TD="class: xl65"]ffVegt[/TD]
   [TD="class: xl68"]cashew   nuts[/TD]
   [TD="class: xl68"]yyDry[/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
  [/TR]
  [TR]
   [TD="class: xl66"]6[/TD]
   [TD="class: xl66"][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
  [/TR]
  [TR]
   [TD="class: xl66"]7[/TD]
   [TD="class: xl66"][/TD]
   [TD][/TD]
   [TD="class: xl74"]K1(Answer) =[/TD]
   [TD="class: xl73"]IF($J$2=VLOOKUP(J2;fruits;1;0);VLOOKUP(J2;fruits;2;0);IF(J2=VLOOKUP(J2;vegestables;1;0);VLOOKUP(J2;vegestables;2;0);VLOOKUP(J2;dryFruits;2;0)))[/TD]
   [TD="class: xl73"] [/TD]
   [TD="class: xl73"] [/TD]
   [TD="class: xl73"] [/TD]
   [TD="class: xl73"] [/TD]
   [TD="class: xl73"] [/TD]
   [TD="class: xl73"] [/TD]
   [TD="class: xl73"] [/TD]
   [TD="class: xl73"] [/TD]
   [TD="class: xl73"] [/TD]
   [TD="class: xl73"] [/TD]
   [TD="class: xl73"] [/TD]
   [TD="class: xl73"] [/TD]
   [TD="class: xl73"] [/TD]
  [/TR]
  [TR]
   [TD="class: xl66"]8[/TD]
   [TD="class: xl66"][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
  [/TR]
  [TR]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
   [TD][/TD]
  [/TR]
 </tbody>[/TABLE]
hi everyone
I have a problem to solve with name range and I ask for help.
I have 3 name ranges, a cell for question (J2), and other to answer (M2), and i would like to use VLOOKUP like above, but it shows N/A.
I think that there are a diferentent way to solve that.
Please, let me ask for your help
thank you
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Forum statistics

Threads
1,223,888
Messages
6,175,206
Members
452,618
Latest member
Tam84

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