Consulting

Results 1 to 3 of 3

Thread: DELETE COLUMS

  1. #1
    VBAX Regular
    Joined
    Aug 2015
    Posts
    7
    Location

    DELETE COLUMS

    Good evening,

    I'm having to export data daily and would like to know the vba code to delete columns, A, D, F, and G along with row #1 and merge the whole worksheet? Your help is greatly appreciated. I've attached the spreadsheet that I'm working with. VBA is awesome!!!


    Thanks in advance,
    ROB
    Attached Files Attached Files

  2. #2
    Hi,
    Sub Macro1()
    Range("A:A,D:D,F:G").Delete Shift:=xlToLeft
    Rows(1).Delete Shift:=xlUp
    End Sub
    This will delete the columns and row 1.
    Not sure what you mean by merge the whole worksheet?
    There was no data on the spreadsheet to 'merge'... so, you'll have to clarify what you actually mean.

  3. #3
    VBAX Regular
    Joined
    Aug 2015
    Posts
    7
    Location
    Thank you so much for the help! I'm just starting VBA and have been going over a lot of literature (hrs and hrs) lol. The data was deleted from the sheet that I uploaded but you help a lot and code is working. Thanks again!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •