Help on Vlookup vs VBA find

TheEMVB

New Member
Joined
Jan 21, 2019
Messages
3
Good afternoon Guys,

I'm really bad at vba. And I'm trying to understand the best way to do this procedure. Maybe you can help me.

I have a Workflow and every line has a LegId. This id is Case Sensitive (since there are equals IDs and the case sensitive is the only difference.
This LegId is on Collum C on the main sheet "TripReport".

what i have to look for: is the LEGID&cell "Z1"&cell "Z2" on "TripReport" ( ex: a0l0X000010BUchHandlingDeparture )
and search it on sheet "Services", collum C and retrieve the cell value on the collum N and copy to sheet "setup" cell "e45"

I try using formulas vlookup and index but doesn't work on case sensitive. I was hoping someone could help me.

Thanks
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
But in column C of the "services" sheet you have something like this: "a0l0X000010BUchHandlingDeparture", then you need some like:

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Cell[/TD]
[TD]Formula[/TD]
[/TR]
[TR]
[TD]D2[/TD]
[TD]=VLOOKUP(C2&$Z$1&$Z$2,services!C:N,12,0)[/TD]
[/TR]
</tbody>[/TABLE]


Test and tell me
 
Upvote 0
But in column C of the "services" sheet you have something like this: "a0l0X000010BUchHandlingDeparture", then you need some like:

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Cell[/TD]
[TD]Formula[/TD]
[/TR]
[TR]
[TD]D2[/TD]
[TD]=VLOOKUP(C2&$Z$1&$Z$2,services!C:N,12,0)[/TD]
[/TR]
</tbody>[/TABLE]


Test and tell me

Hey... Thanks for the reply. But vlookup is not case sensitive. Doesn't work since i have 2 LEGIDs like this : 1- "a0l0X000010BUchHandlingDeparture" 2-"a0l0X000010BUcHHandlingDeparture"

THey could be the same but different on the Case
 
Upvote 0
Test:

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Cell[/TD]
[TD]Formula[/TD]
[/TR]
[TR]
[TD]D2[/TD]
[TD]=INDEX(services!N1:N40,SUMPRODUCT((EXACT(services!C2:C40,C2&$Z$1&$Z$2))*ROW(services!C2:C40)))[/TD]
[/TR]
</tbody>[/TABLE]

Note: The range of N1 must start in row 1
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,876
Members
452,363
Latest member
merico17

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