+ Reply to Thread
Results 1 to 4 of 4

How to apply VBA code to more than one column

  1. #1
    Forum Contributor
    Join Date
    10-26-2012
    Location
    malaysia
    MS-Off Ver
    Excel 2010
    Posts
    138

    How to apply VBA code to more than one column

    Hi, Is it possible to revise the code below so that it applies to more than one columns? The code below applies to column 10 only. I wish that the code can be applied to column 11 and 12 as well.

    example:
    if Target.Column = 10 Then
    if Target.Column = 11 Then
    if Target.Column = 12 Then


    Please Login or Register  to view this content.
    Thank you.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,599

    Re: How to apply VBA code to more than one column

    Try:

    Please Login or Register  to view this content.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor
    Join Date
    10-26-2012
    Location
    malaysia
    MS-Off Ver
    Excel 2010
    Posts
    138

    Re: How to apply VBA code to more than one column

    Thank you TM Shucks. It works.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,599

    Re: How to apply VBA code to more than one column

    You're welcome. Thanks for the rep.

+ 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