is =xlookup the formula I need?

Mel Smith

Well-known Member
Joined
Dec 13, 2005
Messages
1,023
Office Version
  1. 365
Platform
  1. Windows
I run a weekly report that consists of a variable number of lines (500 - 1000+ lines). I have a master list of suppliers and their payment terms and I would like to automate against each line when it will fall due for payment, based on the delivery date and payment terms in my master list. Is using =xlookup the way i should go?

On my report sheet column the delivery date is in column C and supplier name in column F. I would put my formula in to column O.

Many thanks.

Mel
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Sorry, I just feel like I'm missing a critical piece here.
That may be so, but you are also missing the correct syntax for XLOOKUP which is
Excel Formula:
=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode])

Your formula in column O will look something like this:
Excel Formula:
=XLOOKUP(F2,MasterList!$A$2:$B$14,2,FALSE, delivery_date)
Your formula appears to be a mixture of XLOOKUP and VLOOKUP syntax. 😎
 
Upvote 1
Yes, you can use the XLOOKUP function to automate this process. The formula will take the supplier name from Column F and lookup the payment terms from your master list. Then it will use the delivery date from column C to work out when the payment is due. Your formula in column O will look something like this:
Excel Formula:
=XLOOKUP(F2,MasterList!$A$2:$B$14,2,FALSE, delivery_date)
Where MasterList!$A$2:$B$14 is your master list and delivery_date is the delivery date in column C.
 
Upvote 0
Hi mikenelena,

I've put in your formula: =XLOOKUP(F2,Sheet2!$A$2:$B$42,2,FALSE, C2) and I'm getting a #VALUE! error.

Have I mis-copied something?

Mel
 
Upvote 0
Can you give me 1 row of data to test with, if it isn't anything sensitive?
 
Upvote 0
Does this help?
PO-0000120210/Nov/2022
25-Nov-22​
28/Nov/2022Glebe (ATUK)A1 ScrewsA+DSCREWScrew, self tapper, captive washer, 6.3mm x 3/4", black
Mel
 
Upvote 0
Hi Mikenelena,

I can understand the first part of your formula but how does the payment terms (column B of sheet 2) get added to the delivery date, (column C of sheet 1), to give me the Due Date for payment?

Mel
 
Upvote 0
I think we are missing a few columns of data. I'm assuming Glebe (ATUK) is the supplier. Is 25 Nov 2022 the delivery date, and 28 Nov 2022 the payment terms? Sorry, I just feel like I'm missing a critical piece here.
 
Upvote 0
Hi Mikenelena,

The Delivery date is 25 Nov 22
The Supplier is A1 Screws
Payment terms are in column B of Sheet 2

Mel
 
Upvote 0
You haven't given us visibility of your Terms table.
If it simply has a number in it such as 7, 14, 30 something like the below should work.

Book1
ABCDEFGHO
1Doc NoCol2Delivery DateCol3Col4SupplierCol5DescriptionDue Date
2PO-00001202 10/10-Nov-2225-Nov-2228-Nov-22Glebe (ATUK)A1 ScrewsA+DSCREWScrew, self tapper, captive washer, 6.3mm x 3/4", black25-Dec-22
Sheet1
Cell Formulas
RangeFormula
O2O2=IFERROR(C2+XLOOKUP(F2,Sheet2!$A$2:$A$20,Sheet2!$B$2:$B$20,""),"Not Found or not a number")
 
Upvote 0
Solution

Forum statistics

Threads
1,215,409
Messages
6,124,733
Members
449,185
Latest member
hopkinsr

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