+ Reply to Thread
Results 1 to 5 of 5

Macro to delete column in front of yellow highlighted column

  1. #1
    Registered User
    Join Date
    08-10-2011
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    1

    Macro to delete column in front of yellow highlighted column

    Hi,

    I am Getsuko Teng. I have a question.

    Can I know, is there any way to build a macro that can auto recognize yellow highlighted column in the spreadsheet, and then auto delete the column in front of the yellow highlighted column?

    After deleting, the macro is able to copy the whole spreadsheet and paste special to another workbook which is XML file?

    Thanks in advance.


    Regards,
    Getsuko Teng

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Macro to delete column in front of yellow highlighted column

    This macro will delete every column in front of a yellow one.
    Please Login or Register  to view this content.
    If you have 2 adjacent highlighted columns, it will delete the first one.

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,474

    Re: Macro to delete column in front of yellow highlighted column

    What happens if there is more than 1 yellow cell? If the column is B then the column in front would be A

  4. #4
    Registered User
    Join Date
    11-06-2012
    Location
    Quebec, Canada
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: Macro to delete column in front of yellow highlighted column

    Hi. Instead, how would you make a macro to delet all yellow highlighted columns, please?

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Macro to delete column in front of yellow highlighted column

    Mabelita,

    Welcome to the Forum, unfortunately:

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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