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

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
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,224,820
Messages
6,181,159
Members
453,021
Latest member
Justyna P

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