ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Writing Macros (https://www.excelbanter.com/excel-worksheet-functions/81945-writing-macros.html)

sportsbarn

Writing Macros
 
I am having troubles deleting below a certain point when writing macros using
seperate worksheets with varying data amounts.

Is there a way to identify a non-specific point? Instead of a cell specific
point when writing the code, ie (A203:A205)?

CLR

Writing Macros
 
Maybe this line in your code will help......

Range("A203:A205").ClearContents

Vaya con Dios,
Chuck, CABGx3



"sportsbarn" wrote:

I am having troubles deleting below a certain point when writing macros using
seperate worksheets with varying data amounts.

Is there a way to identify a non-specific point? Instead of a cell specific
point when writing the code, ie (A203:A205)?


Scoops

Writing Macros
 
Hi sportsbarn

Not entirely sure what you're after but:

LastRow = Range("A65536").End(xlup).Row

will give you the last used row in column A.

Always delete from bottom to top.

Regards

Steve



All times are GMT +1. The time now is 02:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com