![]() |
Absolute reference in VBA
Hi, I have the following problem in excel: I want to write code in VBA to clear the contents for rows J13:J224. The only problem is that, when I insert a row in this range, cell J224 becomes cell J225. Is it possible in VBA to make an absolute reference to cell J224? It should be possible to insert multiple rows in the range (J13:J224). Thanks in advance! -- leonidas ------------------------------------------------------------------------ leonidas's Profile: http://www.excelforum.com/member.php...o&userid=35375 View this thread: http://www.excelforum.com/showthread...hreadid=553151 |
Absolute reference in VBA
In VBA the inserting of rows is irrelevant
Range("J13:J224").ClearContents If you want that range to grow as data is inserted, then use a workbook name (InsertNameDefine...) and use that name in the code Range("rngData").ClearContents -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "leonidas" wrote in message ... Hi, I have the following problem in excel: I want to write code in VBA to clear the contents for rows J13:J224. The only problem is that, when I insert a row in this range, cell J224 becomes cell J225. Is it possible in VBA to make an absolute reference to cell J224? It should be possible to insert multiple rows in the range (J13:J224). Thanks in advance! -- leonidas ------------------------------------------------------------------------ leonidas's Profile: http://www.excelforum.com/member.php...o&userid=35375 View this thread: http://www.excelforum.com/showthread...hreadid=553151 |
All times are GMT +1. The time now is 01:52 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com