+ Reply to Thread
Results 1 to 4 of 4

Delete Column Macro

  1. #1
    Registered User
    Join Date
    07-05-2013
    Location
    Ohio
    MS-Off Ver
    Excel 2003
    Posts
    14

    Delete Column Macro

    I tried to delete columns which depends on a variable. But the following code doesn't work.
    Thanks.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Delete Column Macro

    Hi, honeybunny,

    mabye try it like this:
    Please Login or Register  to view this content.
    Any reason why you check Row 4?

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,437

    Re: Delete Column Macro

    try this

    Please Login or Register  to view this content.
    I renamed the macro to something different to variable to avoid confusion
    Cheers
    Andy
    www.andypope.info

  4. #4
    Registered User
    Join Date
    07-05-2013
    Location
    Ohio
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Delete Column Macro

    Thanks both of you. That works fine.
    Hi HaHoBe. No special reason. Just a random number.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Macro to count unique values in a column, enter it in next column, then delete duplicates
    By pmorisse in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-25-2013, 03:27 PM
  2. Macro to delete column in front of yellow highlighted column
    By Getsuko Teng in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-06-2012, 02:30 PM
  3. Run Macro Automatically When delete row , changes cell,delete column
    By elevisse in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-27-2012, 07:42 AM
  4. Macro to delete certain columns and delete rows based on time in another column
    By beepbeep27 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-12-2012, 11:47 AM
  5. Macro to delete first row and insert column after a certain number of column
    By arnab0711 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-26-2011, 08:36 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1