Formula or VBA Advice to do a VLOOKUP

VBA learner ITG

Active Member
Joined
Apr 18, 2017
Messages
267
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Hi Experts,

Please can i get your help as me and a coleaugue cant fathom a formul or VBA to undertake this.

I have a challenge where i have a text data table which is like below with up to 1000 text values and i am tyrying to look up a text value and return the value 1 or 2 in the adjacent column.

PARTS AS PART OF A SINGLE JOBFOLDER
DUN249187 DUN249188 DUN249189 DUN249190 DUN249191 DUN249192 DUN249193 DUN249194 DUN249195 DUN249196 DUN249197 DUN249198 DUN249199 DUN249200

<tbody>
</tbody>
1
DMF133,DMF136,DMF137,DMF140,DMF141,DMF142,DMF143,DMF144,DMF148,DMH250,DMH690,DMH691,DMH692,DMH770,DMH771,DMP663,DMSC405,DMT1039,DMT1040,DMT1041,DMT1042,DMT1043,DMT1044,DMT1045,DMT1046,DMT1052,DMT1053,DMT1054,DMT1055,DMT1056,DMT1057,DMT1058,DMT563,DUN11436,DUN11437,DUN11438,DUN11439,DUN180759,DUN49098,DUN49099,DUN49100,DUN52646,DUN52647,DUN52648,DUN52649,DUN52650,DUN52651,DUN52652,DUN52653,

<tbody>
</tbody>
2

<tbody>
</tbody>

I have a column with unique cells and this looks like below:


UNIQUE CELL VALUEFOLDER
DUN249191
DMF133
DMH691

<tbody>
</tbody>

<tbody>
</tbody>
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Re: Formula or VBA Advice to do a VLOOKUP (Not as easy as it sounds)

"return the value 1 or 2"

what determines whether to return 1 or 2?
 
Upvote 0
Re: Formula or VBA Advice to do a VLOOKUP (Not as easy as it sounds)

Apologies, When i refer to 1 or 2 this is a folder ID that is in the adjacent column of the cell value that contains the multiple values of the column "parts as part of a single job".

As these parts can appear in multiple folders this causes any formula we write to fail.

example workbook below

https://zackcarter.wetransfer.com/d...f542633d4b1d9705fc5e57b020171019092806/70ce0d
 
Last edited:
Upvote 0
Re: Formula or VBA Advice to do a VLOOKUP (Not as easy as it sounds)

A formula i have tried =VLOOKUP(INDEX('Job level raw data'!C:C,MATCH("*"&'Line level raw data'!A2&"*",'Job level raw data'!C:C,0)),'Job level raw data'!C:D,2,0)

but works for some and fails for others.

[FONT=&quot]If the part was repeated in several jobs and appeared in multiple folders, because the cell look up value is unique commodity and can appear within several folders.[/FONT]

[FONT=&quot] This wouldnt get captured in the formula as there are 500 odd folders the formula woule be astronomical to build and too complex if something to point too if something went wrong or the data is changed by another user.[/FONT]
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,694
Members
448,979
Latest member
DET4492

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