XLOOKUP Workout
- 02:24
Understand how to use XLOOKUP in Excel.
Transcript
In this first workout, the value we need to look up is a product ID, and it's A134 from this rather small table above, but we're actually interested in the price of this product and we have to imagine that it's a much bigger table, so we're going to use Xlookup to do that. So I start typing in Xlookup, open brackets, and the syntax now tells me that the first thing I'm going to put in is the lookup value. I'm going to get that from C11. Then I press comma, and the next thing it asks me to look up is the lookup array.
Now, this is just these cells here. I don't need to include the return array, which might be all the way over to the right hand side here, as I would have to in H lookup or V lookup.
I then press comma and I can now stipulate my completely delete separate return array. My return array could be in a separate load of cells over to the right hand side. Here, it could be to the left of the lookup array, so this makes it a bit more flexible than other lookup functions. There are then some optional items, so if nothing is found, what do you want? I could put a 0, a dash and n/a, maybe a message saying, not found. I don't need that here, so I'm going to close the brackets and I get the price of 3.5. Let's do another example underneath. In this example, we've got an account number we need to look up PS983, but we're actually looking for the asset value. So maybe these are client accounts and we're looking for the value of their assets. Again, let's use Xlookup to do this. It asks me for the lookup value, that's the accounts number.
Then it's asking me for the lookup array.
There's the area I'm going to look, and then it asks me for the return array, and that's that separate area. In this case, it's to the right hand side, and I close the brackets. Now I think when I press enter, I should get 5,322 is the asset value for this account number, and I do so Xlookup that little bit more flexible than other lookup functions.