Nested if vlookup

xrprrp

New Member
Joined
Dec 17, 2018
Messages
4
Hi,

I am having a problem writing a nested IF with a VLOOKUP.

I have Columns D to O as my table array, with a text string in Col D of which I need to look up "leisure" "business" or "personal".

I then need the result of the formula to put which ever of these text options that appear in the text string in Col D in Col P.

Any help will be greatly appreciated!
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
=iferror(vlookup(...),iferror(vlookup(...),iferror(vlookup(...),"DATA NOT FOUND")))
 
Last edited:
Upvote 0
Then its not found.
What makes you think the data is there?

What is your formula?
 
Upvote 0
In Col D it has a text string like
PD~BusinessDubrovnikLaneDE_CH~DISPLAY_PB_FM~BAN_DT~CROSS_AS~DCMJIVOX_IT~POE_DA~SDBM_DS~MLT_SS~_TG~BHV_TS~PRO_SZ~160X600_AD~SSCLICK_RT~DCPM_VV~VGPMX70IAS

<colgroup><col width="1415" style="width: 1061pt;"></colgroup><tbody>
</tbody>

I need to extract whether it says "Business" "Leisure" "Couples" "Family" from this text string and depending on which one have that entered into col P

I tried =IF(VLOOKUP("leisure",D:O,1,TRUE)="leisure",leisure,IF(VLOOKUP

and repeating it for each word but didn't work?
 
Upvote 0
Well, no that wont work, since you never said the tables contain other data and that the string to lookup is only PART of that data.
You cant use VLOOKUP like that, you were the one that selected VLOOKUP.

Will try and find another way...
 
Last edited:
Upvote 0
Are you trying to check row by row? ie if D2 has Leisure then P2 has leisure
 
Upvote 0
Hi,

You can do it 2 ways.

1. "hard code" the table in the formula, as shown in P1.
2. Create a Table with the LOOKUP values, probably a better way to go, since you can easily change the table values, as shown in Q1.

Either formula copied down.


Book1
DPQRST
1PD~BusinessDubrovnikLaneDE_CH~DISPLAY_PB_BusinessBusinessTableBusiness
2PD~FamilyDubrovnikLaneDE_CH~DISPLAY_PB_FamilyFamilyLeisure
3PD~CouplesDubrovnikLaneDE_CH~DISPLAY_CouplesCouplesCouples
4Family
Sheet405
Cell Formulas
RangeFormula
P1=LOOKUP(2,1/SEARCH({"Business","Leisure","Couples","Family"},D1),{"Business","Leisure","Couples","Family"})
Q1=LOOKUP(2,1/SEARCH(T$1:T$4,D1),T$1:T$4)


EDIT: I've shortened your Text strings for my sample above, as it wasn't showing properly due to it's length.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,983
Messages
6,122,583
Members
449,089
Latest member
Motoracer88

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