+ Reply to Thread
Results 1 to 8 of 8

VBA using IF to offset multiple columns

  1. #1
    Registered User
    Join Date
    04-30-2017
    Location
    Pretoria, South Africa
    MS-Off Ver
    2013
    Posts
    54

    VBA using IF to offset multiple columns

    Hey All,

    This is the code that works when blanking out one column to the right:

    Please Login or Register  to view this content.
    Is it possible to tailor this code to blank out more than one column to the right with out having to copy paste the code for each different column?

    Ideally i need to blank out columns that may not be adjacent to column D, data may need to be blanked out in column H, L, P up to 7 other columns in total
    Last edited by Muktar888; 05-02-2017 at 11:28 AM.

  2. #2
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: VBA using IF to offset multiple columns

    Try
    Please Login or Register  to view this content.
    Etc
    Click *Add Reputation to thank those who helped you. Ask if anything is not clear

  3. #3
    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,754

    Re: VBA using IF to offset multiple columns

    Please Login or Register  to view this content.
    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


  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA using IF to offset multiple columns

    Maybe:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-30-2017
    Location
    Pretoria, South Africa
    MS-Off Ver
    2013
    Posts
    54

    Re: VBA using IF to offset multiple columns

    This worked!!! thanks!

    Added a reputation!

  6. #6
    Registered User
    Join Date
    04-30-2017
    Location
    Pretoria, South Africa
    MS-Off Ver
    2013
    Posts
    54

    Re: VBA using IF to offset multiple columns

    Quote Originally Posted by TMS View Post
    Please Login or Register  to view this content.
    I tried this before posting the thread unsuccessfully, it was what i was looking for.

    Thanks bro

  7. #7
    Registered User
    Join Date
    04-30-2017
    Location
    Pretoria, South Africa
    MS-Off Ver
    2013
    Posts
    54

    Re: VBA using IF to offset multiple columns

    Quote Originally Posted by JOHN H. DAVIS View Post
    Maybe:

    Please Login or Register  to view this content.


    Thanks for responding, this looks hardcore and not sure if it will do what i am looking to do, ie blank out columns that may not be next to column D, or in that order. But i will try this out!

  8. #8
    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,754

    Re: VBA using IF to offset multiple columns

    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)

Similar Threads

  1. Sum Multiple Columns from Other Tab Using Offset or Indirect
    By srrh43 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-15-2016, 05:15 AM
  2. Replies: 5
    Last Post: 02-06-2015, 08:44 PM
  3. Replies: 4
    Last Post: 03-08-2013, 09:49 AM
  4. Offset columns in row formulae
    By nickmangan in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-09-2012, 03:55 AM
  5. Sorting columns using offset
    By sinkingfun in forum Excel General
    Replies: 0
    Last Post: 10-13-2011, 06:49 PM
  6. Using the Find Function and Multiple Offset Columns
    By ashleys.nl in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-08-2011, 02:01 PM
  7. Vlookup/match/offset over multiple columns of lable
    By csw78 in forum Excel General
    Replies: 6
    Last Post: 06-08-2005, 11:39 AM

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