Forum Discussion
SPAMandEGGS
Jul 10, 2023Copper Contributor
Have a cell populate with data depending on what's inputted in 2 other cells. XLOOKUP?
Hello Everyone, So I have been working on this sheet. I fairly novice and have some things working the way I want to. Essentially, I'll just be very deceptive. I am making a tracker and hav...
SnowMan55
Jul 10, 2023Bronze Contributor
If there is only one Required Work Card per department-position combination, then yes, XLOOKUP is an appropriate function to use.
It would have been useful in communicating if you had:
- mentioned your worksheet names; I'm using Sheet1 and L-Range to represent your first (and third) and second screenshots, respectively.
- hidden Sheet1 columns H through S before making the screenshot; those columns are irrelevant to the lookup, and made it more difficult to read the relevant information.
There are at least three ways of referencing the lookup data within the XLOOKUP (or other lookup) function:
- cell-address range references (Note the use of absolute addresses, which include $. This allows cells containing the formula to be easily copied.)
- named range references
- Excel-table structured references
Examples of the first two techniques are shown in the attached workbook, It seems your LU-Range data is not in an Excel table (column G apparently has no column header), so I did not bother coming up with an example of the third technique.
Note that named ranges can be written so as to automatically expand/contract as rows are added/removed; these are dynamic named ranges, as described here and here.
- SPAMandEGGSJul 12, 2023Copper ContributorHi SnowMan55 I sent you the file to look at as I was having difficulty executing your recommendation. Check messages please.