
Use the INDEX and COUNTA functions to
determine the last number in a row
In the previous tip, we learned how to determine the last value
for each column. Use the INDEX function in combination with
COUNTA to determine the last number in a row. The INDEX
function will return the value of an element in a table or an array,
selected by the row and column number indexes.
4
To determine the last number in a row:
1. In cells B2:G10 enter some numbers, leaving some cells
empty.
2. Select cells A2:A10 and type the following formula:
=INDEX(B2:G2,1,COUNTA(B2:G2)).
3. Press <Ctrl+Enter>.
Lookup and Reference Functions 231
9
Figure 9-16