How to make Xlookup return a status

FaezMH

New Member
Joined
Oct 14, 2019
Messages
39
Office Version
  1. 365
Platform
  1. Windows
Hi Guys,

How are you doing..

I have problem to make the Xlookup return a status such as "OK" if it meet the condition otherwise "BAD". At the moment I can only make it return the output in the Status column instead OK/BAD. I tried to use IF functions but nothing comes correctly.

Appreciate if you guys can help.

TEST SCAN METHOD 2.xlsx
ABCDEFGHIJKLMN
1OrderNoBRANDPartNoScanned BarcodeStatusBRANDPartNoRefrence Barcode
2256-KPRO4AE6G132651893265189PRO4AA400AH3265848
3257-KPRO5AE6G132656533265653PRO4AA400BH3265942
4243-KPRO5EE6GB32655483265548PRO4AE6G13265189
5407-KWILSON4AD300A76-581050-0ATECB76-581050-0ATECBPRO5AE6G13265653
6251-KPRO3AS65AA32561023256102PRO5EE6GB3265548
7295-KPRO6EA6500H32661023266102PRO7EA7GB3265559
8277-KPRO7EA7GB32655593265559PRO3AS65AA3256102
9403-KWILSON43S520A76-588660-1ATECK76-588660-1ATECKPRO6EA6500H3266102
10268-KPRO4AA400AH32658483265848WILSON4AD300A76-581050-0ATECB
11279-KPRO4AA400BH32659423265942WILSON43S520A76-588660-1ATECK
12400-KWILSON5AP615B76-588260-1ATGF76-588260-1ATGFWILSON5AP615B76-588260-1ATGF
13420-KWILSON6AP615B76-588760-1ATGK76-588760-1ATGKWILSON6AP615B76-588760-1ATGK
14
15
Sheet1
Cell Formulas
RangeFormula
E2:E13E2=XLOOKUP(C2&D2,M$2:M15&$N$2:N15,$N$2:N15)
Press CTRL+SHIFT+ENTER to enter array formulas surrounded with curly braces.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E2:E13Cell Value="PLS CHECK"textNO


Thank you.

Faez
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Book1
ABCDEFGHIJKLMN
1OrderNoBRANDPartNoScanned BarcodeStatusBRANDPartNoRefrence Barcode
2256-KPRO4AE6G13265189OKPRO4AA400AH3265848
3257-KPRO5AE6G13265654BADPRO4AA400BH3265942
4243-KPRO5EE6GB3265548OKPRO4AE6G13265189
5407-KWILSON4AD300A76-581050-0ATECBOKPRO5AE6G13265653
6251-KPRO3AS65AA3256102OKPRO5EE6GB3265548
7295-KPRO6EA6500H3266102OKPRO7EA7GB3265559
8277-KPRO7EA7Gc3265559BADPRO3AS65AA3256102
9403-KWILSON43S520A76-588660-1ATECKOKPRO6EA6500H3266102
10268-KPRO4AA400AH3265848OKWILSON4AD300A76-581050-0ATECB
11279-KPRO4AA400BH3265942OKWILSON43S520A76-588660-1ATECK
12400-KWILSON5AP615B76-588260-1ATGFOKWILSON5AP615B76-588260-1ATGF
13420-KWILSON6AP615B76-588760-1ATGKOKWILSON6AP615B76-588760-1ATGK
Sheet1
Cell Formulas
RangeFormula
E2:E13E2=IF(XLOOKUP(C2&D2,M$2:$M$15&$N$2:$N$15,$N$2:$N$15,"BAD",0,1)=D2,"OK","BAD")
 
Upvote 0
Solution
Thanks Kerryx....that's great.
Owh....I really never thought that I can actually put a = sign there. I have been trying since yesterday and wondering what went wrong.

Thanks again and really appreciate that.

Faez
 
Upvote 0

Forum statistics

Threads
1,215,442
Messages
6,124,886
Members
449,194
Latest member
ronnyf85

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