Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

deleting columns

  Asked By: John    Date: Nov 21    Category: MS Office    Views: 591
  

I am trying to clean some data that I am importing to run off some
very specific pivot tables. I need specific headings in specific
columns to match up I have created a macro that deletes the unwanted
columns,

' Go to the "Heading1" Column.
Rows("2:2").Select
Selection.Find(What:="Heading1", _
After:=ActiveCell, _
LookIn:=xlFormulas, _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False).Activate
ActiveCell.Select
Range(ActiveCell, ActiveCell.Offset(6536, 0)).Select
Selection.delete Shift:=xlToLeft
Rows("2:2").Select
Selection.delete Shift:=xlUp
Range("a1").Select

But does anyone know if there a more effecient process of achieving
this?

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on deleting columns Or get search suggestion and latest updates.




Tagged: