13,000,017 members (45,832 online)
Rate this:
See more:
i want to find the last empty row for a particular coulmn like A coulmn .

```sub abc()
iRow = wkb1.Sheets("Sheet1").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
End Sub ```

as this is taking only first coulmn and providing me with Irow = 2 but there is data present on second B coulmn .

thanks
aksh619
Posted 25-Oct-12 21:12pm
aksh619297

Rate this:

## Solution 1

Some suggested solutions here[^].
aksh619 26-Oct-12 8:14am

Thanks mate ..
Maciej Los 1-Nov-12 15:46pm

Answer is good, but examples are... ;)
Richard MacCutchan 1-Nov-12 20:53pm

What?
Rate this:

## Solution 2

You can use function, like this:
```Function FirstEmptyRow(wsh As Worksheet, Optional sColName As String = "A") As Long
FirstEmptyRow = wsh.Range(sColName & wsh.Rows.Count).End(xlUp).Row + 1
End Sub```

Usage:
```Dim lFirstEmptyRow AS Long
'default column (A):
lFirstEmptyRow = FirstEmptyRow(ThisWorkbook.Worksheets("Sheet1"))
'or - custom column:
lFirstEmptyRow = FirstEmptyRow(ThisWorkbook.Worksheets(2), "B")
'or (using Activesheet object):
lFirstEmptyRow = FirstEmptyRow(Activesheet, "C")```

Top Experts
Last 24hrsThis month
 RickZeeland 155 Jochen Arndt 60 Michael_Davies 40 ppolymorphe 40 Bharat Leel 35
 OriginalGriff 4,557 ppolymorphe 2,292 RickZeeland 2,162 Kornfeld Eliyahu Peter 1,973 Richard Deeming 1,593