ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Clear Columns Content (https://www.excelbanter.com/excel-programming/344639-clear-columns-content.html)

Lizz45ie[_7_]

Clear Columns Content
 

Hello,
I would like to clear columns on my Excel worksheet using VBA. I tried
some simple code and it only deleted some of the columns. Here is what
I tried.

Range("AF2:BI2").Select
Selection.EntireColumn.Delete


Thanks for any help you can provide.


--
Lizz45ie
------------------------------------------------------------------------
Lizz45ie's Profile: http://www.excelforum.com/member.php...o&userid=23410
View this thread: http://www.excelforum.com/showthread...hreadid=481924


Bob Phillips[_6_]

Clear Columns Content
 
Range("AF2:BI2").ClearContents

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Lizz45ie" wrote in
message ...

Hello,
I would like to clear columns on my Excel worksheet using VBA. I tried
some simple code and it only deleted some of the columns. Here is what
I tried.

Range("AF2:BI2").Select
Selection.EntireColumn.Delete


Thanks for any help you can provide.


--
Lizz45ie
------------------------------------------------------------------------
Lizz45ie's Profile:

http://www.excelforum.com/member.php...o&userid=23410
View this thread: http://www.excelforum.com/showthread...hreadid=481924





All times are GMT +1. The time now is 04:50 AM.

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