ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   delete row or col (https://www.excelbanter.com/excel-programming/303516-delete-row-col.html)

gv

delete row or col
 
I need macro to delete entire row or col

I really appreciate your help! Thanks!



papou[_9_]

delete row or col
 
Hi gv
The macro recorder could also help you achieve this.
Here's a sample code:
Rows("2:2").EntireRow.Delete
Columns("B:B").EntireColumn.Delete

HTH
Cordially
Pascal

"gv" a écrit dans le message de
...
I need macro to delete entire row or col

I really appreciate your help! Thanks!





Alan Beban[_2_]

delete row or col
 
"EntireRow" and EntireColumn" are superfluous; e.g., Rows("2:2") already
refers to the entire row. Where it would be useful is, e.g.,

Rows("A2").EntireRow.Delete

Alan Beban

papou wrote:

Hi gv
The macro recorder could also help you achieve this.
Here's a sample code:
Rows("2:2").EntireRow.Delete
Columns("B:B").EntireColumn.Delete

HTH
Cordially
Pascal

"gv" a écrit dans le message de
...

I need macro to delete entire row or col

I really appreciate your help! Thanks!







All times are GMT +1. The time now is 10:46 AM.

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