# lookup with mulitiple validations?

#### sixsteps268

##### New Member

I am working on some analysis that compares sales to returns.

I have a workbook with a sales sheet that contains Order ID #'s and Sku #'s. Then I have a returns sheet in the same workbook that contains Order ID #'s and Sku #'s.

Some Order ID #'s are single SKU orders, some are not. I have many instances of multiple sku orders where only 1 SKU was returned and not the whole order.

A simple vlookup returns if the order shows up as being returned, but I can't seem to figure out how to return a value if both the order and the sku is returned.

I can't quite get the logic to work. It's like if the order is returned and if the sku of that same order is returned, then return the value.

Does that make sense?

### Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a \$25,000 loan, 5% annual interest, 60 month loan.

#### Sammi

##### New Member
Are you trying to show whether each individual sku is returned?
If so I would make a helper column on both sheets that contains the order # and sku# joined together so =order&sku.
Then do a lookup against that.

#### Redwolfx

##### Well-known Member
F5 and G5 Are the Order and Skew Numbers

A2:C19 Represent the information

Column A Order #s
Column B Skews
Column C Returned Values

You will probably need to modify the code to fit your info.

Code:
``=INDEX(A2:C19,MATCH(F5&G5,A2:A19&B2:B19,0),3)``

Confirm with Ctrl+Shift+Enter not just Enter

#### sixsteps268

##### New Member
Concatenate. Of course! Brilliant!

#### aaronbens

##### Board Regular
Are you trying to add a column in the Sales sheet that will tell you if that line was returned? If so they the following would work:

=IF((COUNTIFS(Returns!\$A\$2:\$A\$10,A2,Returns!\$B\$2:\$B\$10,B2))>0,"Yes","No")

Replies
4
Views
225
Replies
2
Views
254
Replies
0
Views
345
Replies
14
Views
382
Replies
0
Views
218

1,195,618
Messages
6,010,731
Members
441,567
Latest member
Flitbee

### 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.

### Which adblocker are you using?

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

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