Extend A2 to last entry in Col A

Galceran

Board Regular
Joined
Nov 8, 2008
Messages
177
I have a Workbook with 6 worksheets. Sheet 2009 is a database of names and associated data. Sheet Password is a list of encrypted passwords. Sheet Whitelist is a list of E-mail addresses.
I manually add a name(s) and other details to 2009. Then encrypt the password with an online generator, copy/paste the result to Sheet Password.
At this stage a Macro runs sorting the sheets in Alphabetical sequence, formats them in different ways. Sorts Whitelist and 2009 Saving 2009 as CSV file for OE Address book.
I then Block Col A in sheet Password, copy/paste to HTML-Kit for FTP upload.
Followed by Block Col A in Whitelist, copy/paste to HTML-Kit for FTP upload.
What I want the macro to do is after finishing in sheets Password and Whitelist Block A2 down to the last entry ready for me to right clik and Copy. With over 400 entries it is becoming time consuming to do it manually.
Only the last para is the problem!!

Thanks
Gilbert
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Is it?

Code:
Sub test()
Range("A2", Range("A" & Rows.Count).End(xlUp)).Select
End Sub
 
Upvote 0
Hi Gilbert,

Try this :

Code:
    i = Cells(Worksheets("2009").Cells.Rows.Count, "A").End(xlUp).Row
    Worksheets("2009").Range("A2:A" & i).Locked = True
 
Upvote 0

Forum statistics

Threads
1,214,430
Messages
6,119,443
Members
448,898
Latest member
drewmorgan128

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