Delete Entire X Column below Except Header.

harky

Active Member
Joined
Apr 8, 2010
Messages
405
Office Version
  1. 2021
  2. 2019
Platform
  1. Windows
Is there a way,using VBA, to clear E3 & below (the entire column) except the header at A2 ?
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Hello Harky,

......except the header at A2 ?

Do you mean E2? If so, try:-

Code:
Sub Test()

Range("E3", Range("E" & Rows.Count).End(xlUp)).ClearContents

End Sub

Cheerio,
vcoolio.
 
Upvote 0
Sorry my eye blur. Should Column D3 below.

My header is location @ Row A1 and A2 (remain untouch)


Thanks!


Hello Harky,



Do you mean E2? If so, try:-

Code:
Sub Test()

Range("[COLOR=#ff0000]E3[/COLOR]", Range("[COLOR=#ff0000]E[/COLOR]" & Rows.Count).End(xlUp)).ClearContents

End Sub

Cheerio,
vcoolio.
 
Last edited:
Upvote 0
provide a clear pic..
Clear the column D3 below which highlight in yellow.

*using excel 2010


OnsTgqO.png




Hello Harky,


Do you mean E2? If so, try:-

Code:
Sub Test()

Range("E3", Range("E" & Rows.Count).End(xlUp)).ClearContents

End Sub

Cheerio,
vcoolio.
 
Last edited:
Upvote 0
Hi,

Think i manage to find my ans to ans my own question.. haha

Code:
Sub Clear_Column()
    Range("D3", Range("D3").End(xlDown)).ClearContents
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,307
Members
452,633
Latest member
DougMo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top