XLOOKUP Return Value to be Included in Same XLOOKUP Formula

ScottTemple

Board Regular
Joined
Dec 28, 2023
Messages
103
Office Version
  1. 365
Platform
  1. Windows
Hello,

I would like to create a formula that includes Xlookup and then, based off of what is returned, finish the formula with that data, along with data from other cells. I'm not certain how to even begin writing this formula though.

An example would be:

=XLOOKUP(A2,Table1[Setup],Table1[Time],0),IF(B2>C2,(B2-C2)*1440)+datafromxlookup),(1-C2+B2)*1440)+datafromxlookup))
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
What does the lookup result have to do with the beginning of the formula? Can you explain exactly the process you want the formula to achieve? How does the lookup result determine what you do with it?

Something like this crosses my mind:

=IF( XLOOKUP RESULT = xxx, do this with XLOOKUP RESULT, or do this with XLOOKUP RESULT )
 
Upvote 0
Maybe
Excel Formula:
=let(x,XLOOKUP(A2,Table1[Setup],Table1[Time],0),IF(B2>C2,(B2-C2)*1440+x,(1-C2+B2)*1440+x))]
 
Upvote 0
Hey Fluff,

This is in regards to the other extensive Spill Array question you helped me out with recently. Here's what I have:

=let(x,XLOOKUP(INDEX(A2#,,17),Table2[[#All],[Setup]],Table2[[#All],[Time]],0),IF(INDEX(A2#,,15)>INDEX(A2#,,14),(INDEX(A2#,,15)-INDEX(A2#,,14))*1440+x,(1-INDEX(A2#,,14)+INDEX(A2#,,15))*1440+x)))
 
Upvote 0

Forum statistics

Threads
1,223,250
Messages
6,171,036
Members
452,374
Latest member
keccles

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