Here's a little tid-bit I just figured out today... You can use a nested IF statement to output ranges/cross sheet references that are to be evaluated.
The particular use case that led to this was an INDEX/MATCH where we wanted to INDEX on a single date column, but MATCH on one of 4 different columns depending on an Asset Type. We ended up being able to use a nested IF for the "range to search in" portion of the MATCH.
=INDEX({Asset Checkout Range 3}, MATCH(Barcode@row, IF([Asset Type]@row = "Camera", {Asset Checkout Range 1}, IF([Asset Type]@row = "Support", {Asset Checkout Range 2}, IF([Asset Type]@row = "Lighting", {Asset Checkout Range 5}, {Asset Checkout Range 6}))), 0))
I personally like this a little better than writing out four different INDEX/MATCH statements and using IFERRORs to account for the #NO MATCH issue which would have looked like this...
=IFERROR(IFERROR(IFERROR(INDEX({Asset Checkout Range 3}, MATCH(Barcode@row, {Asset Checkout Range 1}, 0)), INDEX({Asset Checkout Range 3}, MATCH(Barcode@row, {Asset Checkout Range 5}, 0))), INDEX({Asset Checkout Range 3}, MATCH(Barcode@row, {Asset Checkout Range 1}, 0))), INDEX({Asset Checkout Range 3}, MATCH(Barcode@row, {Asset Checkout Range 6}, 0)))
We saved 93 characters/keystrokes and only had to reference the INDEX range and the "data to match on" for the MATCH function once each instead of 4 times, and I can't say for sure, but I also feel like this might be a little more efficient on the back-end as well.
I feel like there are a lot more practical applications too.
Here is a link to the thread that prompted this...
So I'm attempting to create an inventory rental sheet where the end users (front desk techs) can enter information on a "Checkout" sheet, and that information can be checked by our main Asset inventory sheet and return the checkout date to the main Asset inventory sheet. Problem is we have multiple types of rental assets, and to add them appropriately to the Checkout sheet they need to be entered into four different columns, "Cameras, Support, Audio, Lighting". I was originally going to try to use a vlookup with helper columns on the main Asset inventory sheet and =max those returns, but I feel like there's a cleaner way of doing it with a next INDEX/MATCH but I'm not familiar enough with it.
Was planning on putting the formula in the [Assignee Check-out Date] column on the Asset sheet, that checks that row's Barcode (column 1 on Asset), across the [Camera Barcode], [Support Barcode], [Lighting Barcode], and [Audio Barcode] on the Check Out sheet and returns the date in the [Check Out Date] from column 6 on the Check Out sheet to the [Assignee Check Out Date] on the Asset sheet.
Any suggestions? Thanks!
https://us.v-cdn.net/6031209/uploads/GLDL1D1YW80S/screen-shot-2021-05-17-at-1-48-57-pm.png
https://us.v-cdn.net/6031209/uploads/ECFQQE65DXT2/screen-shot-2021-05-17-at-1-50-39-pm.png