VLOOKUP with MULTIPLE CONDITION

Harold Garcia

Board Regular
Joined
Jan 2, 2014
Messages
72
Dear Expert,

Can you help me find a formula that will solve my problem.

Ticket SequenceValidation CodeAmountDateName
123488145000Apri1John
12221598100May2Mark
12212456150Feb4Luke
12346871200Mar10Matthew

<tbody>
</tbody>

Can your give me a formula that will satisfy this condition

1. From a separate worksheet I will encode the Ticket Sequence and Validation Code. The Amount, Date and Name will automatically appear.
2. I cannot use the vlookup since there are duplicate ticket sequence.
3. Is there any vlookup formula using multiple conditions.

Thank You
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Assuming data in Sheet1 columns A:E; headers in row 1

Try in another sheet

A
B
C
D
E
1
Ticket Sequence​
Validation Code​
Amount​
Date​
Name​
2
1222​
1598​
100​
May2​
Mark​

Array formula in C2 copied across
=INDEX(Sheet1!C$2:C$100,MATCH(1,IF(Sheet1!$A$2:$A$100=$A2,IF(Sheet1!$B$2:$B$100=$B2,1)),0))
confirmed with Ctrl+Shift+Enter, not just Enter

M.
 
Upvote 0
Assuming data in Sheet1 columns A:E; headers in row 1

Try in another sheet

A
B
C
D
E
1
Ticket Sequence​
Validation Code​
Amount​
Date​
Name​
2
1222​
1598​
100​
May2​
Mark​

<tbody>
</tbody>


Array formula in C2 copied across
=INDEX(Sheet1!C$2:C$100,MATCH(1,IF(Sheet1!$A$2:$A$100=$A2,IF(Sheet1!$B$2:$B$100=$B2,1)),0))
confirmed with Ctrl+Shift+Enter, not just Enter

M.
Sir Marcelo,

Thanks for the reply but the formula dont work. Maybe my mistake.
From a separate worksheet what will be the formula i will use in C2,D2 and E2 to automatically transfer data from the source data. I will only encode the Ticket Sequence and validation Code.

Thank You
 
Upvote 0
The formula worked perfectly for me.
Have you confirmed the formula with Ctrl+Shift+Enter simultaneously?

M.
 
Upvote 0
Dear Expert,

Can you help me find a formula that will solve my problem.

Can your give me a formula that will satisfy this condition

1. From a separate worksheet I will encode the Ticket Sequence and Validation Code. The Amount, Date and Name will automatically appear.
2. I cannot use the vlookup since there are duplicate ticket sequence.
3. Is there any vlookup formula using multiple conditions.

Thank You

Hi!

Try the formula below too:

In C2 in the Main sheet and copy down and to the right

=INDEX(Sheet1!$C$2:$E$5,MATCH(2,MMULT(--(Sheet1!$A$2:$B$5=$A2:$B2),{1;1}),0),MATCH(C$1,Sheet1!$C$1:$E$1,0))


ABCDEFIJKLMN
1Ticket SequenceValidation CodeAmountDateNameSheet1Ticket SequenceValidation CodeAmountDateNameSheet
2123488145000Apri1JohnMain2123488145000Apri1JohnSheet1
312346871200Mar10Matthew312221598100May2Mark
4412212456150Feb4Luke
5512346871200Mar10Matthew
66
********************************************************************************************************************************

<tbody>
</tbody>


By the way Marcelo's formula work for me.

Markmzz
 
Upvote 0
or
Code:
{=INDEX(C$2:C$5,MATCH($J3&$K3,$A$2:$A$5&$B$2:$B$5,0))}
Marcello's technique is new to me. I wouldn't be surprised if he has tested it against these others and has a good reason to use. Probably a little faster on big tables.
Mine is what Mike Girvin has written on and I think it is a little easier to follow the logic. It took me a moment to see why Marcello is matching a 1, its TRUE!

"...It Depends"
 
Upvote 0
or
Code:
{=INDEX(C$2:C$5,MATCH($J3&$K3,$A$2:$A$5&$B$2:$B$5,0))}
Marcello's technique is new to me. I wouldn't be surprised if he has tested it against these others and has a good reason to use. Probably a little faster on big tables.
Mine is what Mike Girvin has written on and I think it is a little easier to follow the logic. It took me a moment to see why Marcello is matching a 1, its TRUE!

"...It Depends"

Im very sorry, but i cannot use all the given formula. My mistake.
 
Upvote 0
Im very sorry, but i cannot use all the given formula. My mistake.

Hi Harold,

Try this small modification in my formula (in red - put the name of the sheet between the character '):

=INDEX('Sheet 1'!$C$2:$E$5,MATCH(2,MMULT(--('Sheet 1'!$A$2:$B$5=$A2:$B2),{1;1}),0),MATCH(C$1,'Sheet 1'!$C$1:$E$1,0))

By the way, do the same in Marcelo's formula too.

Markmzz
 
Upvote 0
Hi Harold,

Try this small modification in my formula (in red - put the name of the sheet between the character '):

=INDEX('Sheet 1'!$C$2:$E$5,MATCH(2,MMULT(--('Sheet 1'!$A$2:$B$5=$A2:$B2),{1;1}),0),MATCH(C$1,'Sheet 1'!$C$1:$E$1,0))

By the way, do the same in Marcelo's formula too.

Markmzz

Again thank you for not surrendering to help me. But unfortunately the formula wont work, i cannot follow or understand the formula. Is there any other way? like vlookup or macro?
 
Upvote 0
Again thank you for not surrendering to help me. But unfortunately the formula wont work, i cannot follow or understand the formula. Is there any other way? like vlookup or macro?

Could you, please, tell us the exact location of your data. To provide a formula that works we need to know: sheet name; rows and columns that contain the data you showed in your first message.

M.
 
Upvote 0

Forum statistics

Threads
1,216,095
Messages
6,128,795
Members
449,468
Latest member
AGreen17

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