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

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
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
Well done Harky! Good to see.

Cheerio,
vcoolio.
 
Upvote 0

Forum statistics

Threads
1,215,749
Messages
6,126,656
Members
449,326
Latest member
asp123

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