Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Stop Macro Auto Fill Based On where Data Stops

Status
Not open for further replies.

NYFashionToGo

Technical User
Jan 16, 2007
76
US
I have been helping someone create a workbook to write Completed HTML code. Due to the nature of it. I used formulas and I am using the Autofill to copy down the formulas. Right now Its working Great. I can literally write about 4000 different unique web pages in a very short time, A minute or two . When I did the autofill routine It was based on the data I had. However Id Like to save this as a tool. And based on The actual input Say it stops at row 50. When I run the macro it still goes 4000 lines.... Is there any way to stop an autofill based on when another sheets data ends.... Just curious if this could be done..

Thanks
 
Hi,

There are many ways of doing this.

you can use something like:
Code:
Sheet1.Cells(65536,1).End(xlUp)

This topic has been described many many times already.
Search the forum for more techniques.

Cheers,

Roel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top