Solved i need VBAcode for inserting the column before some heading?

October 3, 2016 at 04:53:22
Specs: Windows 7
i need to add the VBA column before some particular column heading
i just want to find the "US GAAP" and want to insert the column infront of that

message edited by baji11092


See More: i need VBAcode for inserting the column before some heading?

Reply ↓  Report •


#1
October 3, 2016 at 05:49:03
✔ Best Answer
Assuming your column heading is in Row 1, try this:

Sub InsertCol()
 With Rows(1)
  Set c = .Find("US GAAP", lookat:=xlWhole)
   If Not c Is Nothing Then
    c.EntireColumn.Insert shift:=xlToLeft
   Else
    MsgBox "Heading Not Found"
   End If
 End With
End Sub

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Reply ↓  Report •
Related Solutions


Ask Question