IF/AND, VLOOKUP, MATCH, tried them all

EvanDef

New Member
Joined
Jan 6, 2014
Messages
21
Hello Forum Experts!

I have a dillemma I hope someone may be able to help solve.

I have 2 sheets in the same workbook, RAW and Defects. Both sheets have mostly the same Headers but not in the same order. On the Defects sheet, I am trying to populate an 'Order Status' from the RAW sheet if Case numbers match between the two sheets. One thing to consider, there could be multiple Case No.'s in the defects sheet that match the RAW sheet.

Here is an example:
RAW Sheet[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Column I[/TD]
[TD]Column L[/TD]
[/TR]
[TR]
[TD]Order Status[/TD]
[TD]Case No.[/TD]
[/TR]
[TR]
[TD]Closed[/TD]
[TD]234-13-108921.01[/TD]
[/TR]
[TR]
[TD]Pending[/TD]
[TD]002-14-111961.01[/TD]
[/TR]
[TR]
[TD]Cancelled[/TD]
[TD]006-14-106841.01[/TD]
[/TR]
[TR]
[TD]Closed[/TD]
[TD]014-14-102681.02[/TD]
[/TR]
[TR]
[TD]Pending[/TD]
[TD]014-14-124681.01[/TD]
[/TR]
</tbody>[/TABLE]

Defects Sheet
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Column D[/TD]
[TD]Column Y[/TD]
[/TR]
[TR]
[TD]Case No.[/TD]
[TD]Order Status[/TD]
[/TR]
[TR]
[TD]234-13-108921.01[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]234-13-108921.01[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]002-14-111961.01[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]006-14-106841.01[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]006-14-106841.01[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]006-14-106841.01[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]014-14-102681.02[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]014-14-124681.01[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


Thanks for your time!
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Try

=INDEX('RAW Sheet'!I:I,MATCH('RAW Sheet'!L1,'DEFECTS Sheet'!D:D,0))
 
Upvote 0
EvanDef,

I was thinking....
Excel Workbook
IJ
1Order StatusCase No.
2Closed234-13-108921.01
3Pending002-14-111961.01
4Cancelled006-14-106841.01
5Closed014-14-102681.02
6Pending014-14-124681.01
RAW


Excel Workbook
DEFGHIJKLMNOPQRSTUVWXY
1Case No.Order Status
2234-13-108921.01Closed
3234-13-108921.01Closed
4002-14-111961.01Pending
5006-14-106841.01Cancelled
6006-14-106841.01Cancelled
7006-14-106841.01Cancelled
8014-14-102681.02Closed
9014-14-124681.01Pending
1012345-2323**No Match**
Defects



Hope that helps.
 
Upvote 0
Thanks for the reply Skybluekid. Using your formula, I obtained about the same results as what I was trying. About 1/3 of the data returns populated with the right status, a few come back with "0" and the majority are #N/A.
 
Upvote 0
Hello Snakehips, i noticed your reply after i replied to Skyblue. When i tried your formula, everything came back **No Match**.
 
Upvote 0
This is what I have tried as well...
=VLOOKUP($D2,'Raw'!$A$1:$L$339,MATCH(Y$1, 'Raw'!$A$1:$L$1,0),0)
Similar results to Skyblue's formula
 
Upvote 0
Hello Snakehips, i noticed your reply after i replied to Skyblue. When i tried your formula, everything came back **No Match**.

As you can see from my posted example it does return the status.
Have I misinterpreted the layout of your data?
 
Upvote 0
Column J is Actually Column L, from my example, but I dont think that should make a difference if I simply correct it in my formula. Would the 'Column#' you have listed as "1" make a difference? Reading the formula makes perfect sense and it shoudl work. i am thinking maybe I ommitted a critical detail, but I cant think of it.
 
Upvote 0
OK, VLOOKUP is not going to work, because it can't return a value that is 'to the left' of the column the match is found in.
So throw that away..

INDEX/MATCH is the way to go.

Skyblue almost had it, but it looks like the sheet names were reversed in the Match part

=INDEX('RAW Sheet'!I:I,MATCH('RAW Sheet'!L1,'DEFECTS Sheet'!D:D,0))
should be
=INDEX('RAW Sheet'!I:I,MATCH('DEFECTS Sheet'!D1,'RAW Sheet'!L:L,0))
 
Upvote 0
Sorry for that error.

However, it should work with a change of column reference???
Excel Workbook
DEFGHIJKLMNOPQRSTUVWXY
1Case No.Order Status
2234-13-108921.01Closed
3234-13-108921.01Closed
4002-14-111961.01Pending
5006-14-106841.01Cancelled
6006-14-106841.01Cancelled
7006-14-106841.01Cancelled
8014-14-102681.02Closed
9014-14-124681.01Pending
1012345-2323**No Match**
Defects
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,313
Members
452,634
Latest member
cpostell

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