How can I apply the VLOOKUP
function when lookup ranges and value in multiple column.
Data and result same but table range different. I need two different formula based on the following data and table.
REQUIRED-I REQUIRED-II
DATA-I TABLE-1 DATA-II TABLE-II
PART RESULT PART STATUS PART STATUS PART RESULT US UK
2644 2625 US 2683 UK 2644 2625 2683
2693 UK 2633 US 2667 UK 2693 UK 2633 2667
2691 UK 2654 US 2668 UK 2691 UK 2654 2668
2668 UK 2610 US 2685 UK 2668 UK 2610 2685
2667 UK 2653 US 2675 UK 2667 UK 2653 2675
2685 UK 2658 US 2599 UK 2685 UK 2658 2599
2675 UK 2637 US 2691 UK 2675 UK 2637 2691
2460 UK 2652 US 2693 UK 2460 UK 2652 2693
2610 US 2460 UK 2610 US 2460
2697 2688 UK 2697 2688
2688 UK 2688 UK
2599 UK 2599 UK
2626 2626
2597 2597
2637 US 2637 US
2652 US 2652 US
2654 US 2654 US
2683 UK 2683 UK
2653 US 2653 US
2664 2664
2633 US 2633 US
2558 2558
Answer
For vlookup, the lookup range must be a contiguous, single range - it cannot be split or on different multiple columns.
As for the data you show it would be better to show images of the sheet and how the data is laid out.
Edit: Had to build your data, so see the image, only did the first table. Note that the part status table for the US and UK has been combined into 1 table. You can split it out by having two vlookups, but it is simpler to just have 1 table IMHO and you can keep it sorted to see which is which.
Note the use of named ranges...
This is the formula in B4 :
=IFERROR(VLOOKUP(A4,Part_Status,2,0),$E$2)
and the iferror will put the word "check" in the result if there is no value, "check" is in cell E2 and you can edit it...
No comments:
Post a Comment