This is the formula that applies to your example tables in the post beginning "see below. I want to, as an example…"
VLOOKUP(TRUE,Unit Identifier Table::$A:$F,5,FALSE)
Parsing the formula above:
The formula is placed in cell K5 of my example table to reduce the need for shrinking the image to accommodate more than 26 columns, plus the lookup table beside it. As all cell references in the formula are to cells on a different table, entering the formula into a different cell on the Checkin table will NOT require changing any of the cell addresses.
VLOOKUP is told to search column A, the leftmost column of six columns (A to F) of a table named "Unit Identifier Table" to find a cell containing the value "TRUE". (a checkbox cell that is checked).
When it finds that cell, the 5 in the formula tells VLOOKUP to return the value in the cell on the same row of the fifth column (E) of the search area (columns A to F of the table named "Unit Identifier Table"
The value in that cell (the text string FPB is returned to the cell containing the formula, and Numbers closes the formula and carries on to the next formula.
Placing this formula in cell X5 of the Checkin table does not require any changes to the formula, but…
If the Unit Identifier Table is not named "Unit Identifier Table" or has fewer than 6 columns, the formula will return an error message.
Constructing the formula:
Click on cell X5 of the checkin table. press = to open the formula editor;
In the editor, type vl
As VLOOKUP is the only Numbers function containing this letter pair, it will immediately appear in the Editor.
Click the shape with that label to confirm that VLOOKUP is the function you want.
The rest of the formula's hint lozenges will be added to the display.
Click on the first lozenge (search-for) and type true
Click on TRUE in the choices menu that appears below the Editor.
The first lozenge will turn darker grey, and be labeled "TRUE"
Click on the second lozenge (columns-range) to select it. The range is on a different table on a different sheet, so…
Click on the tab "PA Unit Identifiers" to open that sheet. (The Formula Editor will follow you there)
Move the pointer to a location near cell A1 on the Unit Identification Table to make the row and column reference tabs appear.
Move the pointer to the tab for column A, press the mouse button, and with the button down, drag right to select all columns from A to the column containing the identifier codes (E), then release the mouse button.*
Click on the next lozenge (return-column). type 5 (the number of the column from which the result is to be returned in the column range selected. (A is 1, B is 2…E is 5).
Click the last lozenge, and select Exact Match from the two-choice menu it contains.
Click the green checkmark to confirm the formula and return to the sheet containing the formula.
*I had some difficulty expanding the column selection from A to A:E. If this also happens to you:
Select column A by clicking on its tab.
Drag the circle that appears at the bottom right corner of the column to the right to add the other columns to the selection, stopping at the column containing the ID codes.
Note that the name of the table (and, if necessary, the name of its sheet) will be automatically attached to the column range,
Regards,
Barry