+ Reply to Thread
Results 1 to 9 of 9

Amendment to Code

  1. #1
    Forum Contributor
    Join Date
    06-25-2011
    Location
    Sydney
    MS-Off Ver
    Excel 2016
    Posts
    615

    Amendment to Code

    Hi Folks
    I need the Code as shown below amended to NOT bring in Col I
    So it brings in Cols A:H and then J:BN leaving I out.
    Also need it to only clear the Cols that are imported, no others including Col I

    I had a play around with it but could not get it right.
    Cheers
    hammer

    Please Login or Register  to view this content.
    If you have found solving my problem/s to be an interesting and educational exercise then how about Repping me up?
    No idea why I need Rep, other than feeling left out....

  2. #2
    Administrator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs
    MS-Off Ver
    MS Office 365 Win 11 Home 64 Bit
    Posts
    21,749

    Re: Amendment to Code

    Use the Union Function in VBA to copy the two ranges.

    https://msdn.microsoft.com/en-us/lib.../ff834621.aspx
    Alan


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Contributor
    Join Date
    06-25-2011
    Location
    Sydney
    MS-Off Ver
    Excel 2016
    Posts
    615

    Re: Amendment to Code

    Thanks for the reply-
    But, being the original Dummy that I am, I cannot get it right-
    Then there's the not clearing Col I when running the Code-
    Cheers
    hammer

  4. #4
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,517

    Re: Amendment to Code

    Give this a try

    Please Login or Register  to view this content.
    Last edited by mike7952; 03-05-2016 at 08:43 PM.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  5. #5
    Forum Contributor
    Join Date
    06-25-2011
    Location
    Sydney
    MS-Off Ver
    Excel 2016
    Posts
    615

    Re: Amendment to Code

    Thanks for the Reply Mike-
    I amended it to this:
    Please Login or Register  to view this content.
    Which seems to work okay, but it still clears Col I- can we avoid that?
    Cheers
    Phil

  6. #6
    Forum Contributor
    Join Date
    06-25-2011
    Location
    Sydney
    MS-Off Ver
    Excel 2016
    Posts
    615

    Re: Amendment to Code

    I need to use a Formula in Col I which is why I do not want the Code to clear it-

  7. #7
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,517

    Re: Amendment to Code

    Okay I missed that part

    Please Login or Register  to view this content.
    Or

    Please Login or Register  to view this content.
    Last edited by mike7952; 03-05-2016 at 08:59 PM.

  8. #8
    Forum Contributor
    Join Date
    06-25-2011
    Location
    Sydney
    MS-Off Ver
    Excel 2016
    Posts
    615

    Re: Amendment to Code

    We have a winner!!
    Many thanks yet again Mike- appreciate the time and effort.
    Cheers
    hammer

  9. #9
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,517

    Re: Amendment to Code

    Your welcome Phil, 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. [SOLVED] Code amendment request to hide all rows at the end
    By mso3 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-03-2015, 09:32 PM
  2. Code Amendment - Delete Empty Rows
    By TextMonkey in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-23-2013, 08:03 AM
  3. VB code amendment help.
    By sem in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 04-26-2012, 07:23 AM
  4. I want the amendment to this code
    By hesham63 in forum Excel General
    Replies: 2
    Last Post: 08-05-2011, 06:41 PM
  5. Macro Amendment Required For Calculation Code
    By JimmiOO in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-27-2010, 08:16 AM
  6. Copy code amendment.
    By Flower R in forum Excel General
    Replies: 4
    Last Post: 12-10-2008, 09:08 PM
  7. if code amendment help
    By khalid79m in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-31-2008, 07:27 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