Return Last Empty Row in a TextLabel - Userform

Karmadyl

New Member
Joined
Feb 22, 2019
Messages
4
Good day,

My question is quite simple : I am trying to return the last empty row from a table (Line number where the data will be inserted) into a Text Label that will show on my UserForm. I've looked around and I couldn't stubble upon anything relevant.

Thanks,
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Hello,

Not sure to fully understand your question ...

If within a given range, you need the Row number of the last empty row ...

you could test following :

Code:
=SUMPRODUCT(MAX((ROW(A1:A20))*(A1:A20="")))

Hope this will help
 
Upvote 0
Put the follwing in your userform

Code:
Private Sub UserForm_Activate()
    Label1 = " last empty row : " & Range("A" & Rows.Count).End(xlUp).Offset(1).Row
End Sub
 
Upvote 0
Hope there is no confusion between the Last Empty Row ... and the Last Empty Row within a predetermined range ...
 
Upvote 0
Then we should not speculate about confusions, let's wait for the test and then ...
 
Upvote 0
I'm glad to help you. Thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,252
Members
452,623
Latest member
Techenthusiast

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top