I need a formula *(not VBA)* that will return the row number of the last used cell in a worksheet.

I have data like:

Not all columns have data and the columns are not filled with the same number of rows.

If I was dealing with only a single column *(say column F)*, I would use:

```
=SUMPRODUCT(MAX((ROW(Sheet1!F:F))*(Sheet1!F:F<>"")))
```

which yields *13*, but the data spans many columns in *Sheet1*

If I could use VBA rather than a formula, I would use something like:

```
Sub GetLastRow()
Dim LastRow As Long, rng As Range
Set rng = Sheets("Sheet1").Cells
LastRow = rng.Find(what:="*", after:=rng(1), searchdirection:=xlPrevious).Row
MsgBox LastRow
End Sub
```

I think I am missing something very simple.

`=MAX(IFERROR(MATCH("ZZZ",F:F),0),IFERROR(MATCH(1E +99,F:F),0))`

– Scott Craner Jan 3 '17 at 15:39THANKS !– Gary's Student Jan 3 '17 at 15:49