+ Reply to Thread
Results 1 to 4 of 4

Macro copying Column Range instead of individual Column

  1. #1
    Registered User
    Join Date
    09-20-2017
    Location
    Vancouver
    MS-Off Ver
    2013
    Posts
    4

    Macro copying Column Range instead of individual Column

    I've written a basic macro with extracts records based on two dates:

    Please Login or Register  to view this content.
    The problem I am having is that it is returning every column between Cells(i, 2) to Cells(i , 6).
    I had intended to only copy the two columns (Column B and F), how can I achieve this?
    Do I need to do a separate line for each column?

    Thanks!
    Last edited by GuardianEnzo; 09-20-2017 at 07:17 PM.

  2. #2
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Macro copying Column Range instead of individual Column

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    09-20-2017
    Location
    Vancouver
    MS-Off Ver
    2013
    Posts
    4

    Re: Macro copying Column Range instead of individual Column

    Thanks for the reply,

    I tried using your code but I get an "End If without Block If" Error.
    Any ideas? Not too sure why its returning that as there is an If statement 6 lines above...

    Removing the End If returns: "Invalid Next control variable reference"
    Last edited by GuardianEnzo; 09-20-2017 at 07:02 PM.

  4. #4
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Macro copying Column Range instead of individual Column

    Please Login or Register  to view this content.

+ 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. Replies: 2
    Last Post: 11-05-2015, 11:58 AM
  2. [SOLVED] Column Range copying and pasting to another column
    By vtcin in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-26-2014, 07:06 PM
  3. Replies: 2
    Last Post: 04-11-2014, 12:18 PM
  4. Replies: 2
    Last Post: 10-30-2013, 06:03 PM
  5. [SOLVED] Excel 2007 Column Chart - change individual column colour
    By SAsplin in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 10-25-2013, 06:57 AM
  6. Replies: 3
    Last Post: 05-10-2013, 04:07 AM
  7. [SOLVED] macro for copying a range to a column of cells
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-08-2006, 08:15 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