# Need desire output using Vlookup

#### aparvez007

##### Member
Hi all,
I want desire output using vlookup for multiple value in data table.
Sample attached.

Thanks
pAvi

#### Attachments

• 9.7 KB Views: 4

#### bosco_yip

##### Excel Ninja
2 criteria Vlookup solution

In D2, copied down :

=IF(COUNTIFS(A\$2:A2,A2,B\$2:B2,B2)=1,VLOOKUP(A2&B2,IF({1,0,0},INDEX(Sheet2!\$A\$4:\$A\$6&Sheet2!\$B\$4:\$B\$6,0),Sheet2!\$A\$4:\$C\$6),3,0),0)

Regards
Bosco

#### Attachments

• 11.7 KB Views: 4

#### aparvez007

##### Member
=IF(COUNTIFS(A\$2:A2,A2,B\$2:B2,B2)=1,VLOOKUP(A2&B2,IF({1,0,0},INDEX(Sheet2!\$A\$4:\$A\$6&Sheet2!\$B\$4:\$B\$6,0),Sheet2!\$A\$4:\$C\$6),3,0),0)

Formula is not working for my actual data as my data have many column.
I didn't understand the underlined IF. Please explain.
and customer number is unique so customer name is not compulsory to concatenate.

Regards,
pAvi

#### bosco_yip

##### Excel Ninja
=IF(COUNTIFS(A\$2:A2,A2,B\$2:B2,B2)=1,VLOOKUP(A2&B2,IF({1,0,0},INDEX(Sheet2!\$A\$4:\$A\$6&Sheet2!\$B\$4:\$B\$6,0),Sheet2!\$A\$4:\$C\$6),3,0),0)

Formula is not working for my actual data as my data have many column.
I didn't understand the underlined IF. Please explain.
and customer number is unique so customer name is not compulsory to concatenate.

Regards,
pAvi
If the formula doesn't working with you, just disregarded it. It is no necessary to give further explanation of the formula.

Regards
Bosco

Thanks