Forum Discussion
Formula help
Can you please attach a sample file or share via OneDrive, Google-Drive, Dropbox or similar service?
- Carl_61Dec 05, 2025Iron Contributor
I do not know how to attach the file. Please assist.
This formula is in cell B8 and works but only displays the description for the 1st key number found in A8. The formula gets drug down from B8:B18.
=IF(A8="","",
LET(
keyNum, A8,
cleanKey, IF(LEFT(keyNum,1)="V", MID(keyNum,2,99), keyNum),
idVal, 'Key Issue Form'!$D$6,
roomVal, 'Key Issue Form'!$K$14,logKeys, 'Key Log'!$K$4:$K$1000,
logIDs, 'Key Log'!$A$4:$A$1000,
logRooms, 'Key Log'!$C$4:$C$1000,
logTypes, 'Key Log'!$F$4:$F$1000,
logStatus, 'Key Log'!$E$4:$E$1000,
logDates, 'Key Log'!$D$4:$D$1000,matchRowsStrict, FILTER(
ROW(logKeys)-3,
(logKeys=cleanKey)*(logIDs=idVal)*(logRooms=roomVal)
),matchRowsRelaxed, FILTER(
ROW(logKeys)-3,
(logKeys=cleanKey)*(logIDs=idVal)
),matchRow, IFERROR(INDEX(matchRowsStrict, ROW(B8)-ROW($B$8)+1),
INDEX(matchRowsRelaxed, ROW(B8)-ROW($B$8)+1)),keyType, INDEX(logTypes, matchRow),
status, INDEX(logStatus, matchRow),
transDate, TEXT(INDEX(logDates, matchRow), "m/d/yy"),
roomUsed, INDEX(logRooms, matchRow),isSuite, IF(OR(RIGHT(roomUsed,1)="A", RIGHT(roomUsed,1)="B"), TRUE, FALSE),
desc, IF(keyType="Swipe Key",
IF(isSuite, "Combined Main & BDRM Door Swipe Key", "Main Door Swipe Key"),
IF(isSuite, "Combined Main & Room Door Hard Key", "Main Door Hard Key")),desc & " - " & status & ", " & transDate
))This formula is the one in A8:A18 and it appears to be working:
=IFERROR(
INDEX('Key Log'!$K$4:$K$1000,
SMALL(
FILTER(ROW('Key Log'!$K$4:$K$1000)-3,
('Key Log'!$A$4:$A$1000='Key Issue Form'!$D$6)*
('Key Log'!$C$4:$C$1000='Key Issue Form'!$K$14)),
ROWS(A$8:A8))
),
"")It is supposed to search thru the Key Log and find all transactions that match to the ID # and room number. It should show row by row, any transactions that match. So, A8 might show a swipe key number of
1960404
and a hard key number of 60. Based on the room number an appropriate description is supposed to be displayed in B8:B18. The problem however is, I'm not getting the discerptions for the keys in A8:A18 except for the B8:B18 description. I get things like #Calc!, #Ref, #N/A.
Please help me understand how to attach the sample data. There use to be a button for attaching a file but I do not see that anymore.
Carl