+ Reply to Thread
Results 1 to 9 of 9

How to edit the destination location of my current code

  1. #1
    Forum Contributor
    Join Date
    04-19-2013
    Location
    Yorkshire, England
    MS-Off Ver
    Excel 2010
    Posts
    297

    How to edit the destination location of my current code

    Another forum user kindly produced a code for me yesterday that creates a unique list and copies it to another worksheet.

    I am having trouble editing the destination location though. It currently copies values in column A, row 2 (Sheet1) to column A, row 2 (Sheet2)- so as to leave headings.

    I am trying to get it leave a blank cell in Sheet2 and so paste to A3 instead.

    the code is:

    Please Login or Register  to view this content.
    I have tried changing it in the following way- which does move the data a line down but then also copies the heading from Sheet1, A1 and puts it in Sheet2, A2 where I want the blank to be:

    Please Login or Register  to view this content.
    Any ideas?

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: How to edit the destination location of my current code

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    04-19-2013
    Location
    Yorkshire, England
    MS-Off Ver
    Excel 2010
    Posts
    297

    Re: How to edit the destination location of my current code

    Massive thanks AB33 that does alter the destination location.

    For some reason it is copying the header across as well now (though I think now it has always been doing that).

    Any idea how I might stop that from copying across?

  4. #4
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: How to edit the destination location of my current code

    Please Login or Register  to view this content.
    If solved remember to mark Thread as solved

  5. #5
    Forum Contributor
    Join Date
    04-19-2013
    Location
    Yorkshire, England
    MS-Off Ver
    Excel 2010
    Posts
    297

    Re: How to edit the destination location of my current code

    AB33 had just posted that above but thanks Patel- any chance you might have any ideas on my second post?

    Quote Originally Posted by strud View Post

    For some reason it is copying the header across as well now (though I think now it has always been doing that).

    Any idea how I might stop that from copying across?

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: How to edit the destination location of my current code

    Strud,
    The code should copy a single column in column A. As the code loops from 1, the header would be copied, but on column A, ONLY. Are you saying that the code copies the header in all columns? That is in A,B and so on?

  7. #7
    Forum Contributor
    Join Date
    04-19-2013
    Location
    Yorkshire, England
    MS-Off Ver
    Excel 2010
    Posts
    297

    Re: How to edit the destination location of my current code

    No just column A's header- but ideally I would like it not to do that if this is possible, so that the column is copied from A2 rather than the whole column

  8. #8
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: How to edit the destination location of my current code

    If the header is in row 1

    Please Login or Register  to view this content.
    INTO
    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    04-19-2013
    Location
    Yorkshire, England
    MS-Off Ver
    Excel 2010
    Posts
    297

    Re: How to edit the destination location of my current code

    Massive thanks AB33 that works perfectly!

+ 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. Code that works in one location but not another location. (AdvancedFilter excel function)
    By 111StepsAhead in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-29-2013, 02:18 PM
  2. Store current cell location to use same location on other worksheet
    By jmvdholst in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-22-2013, 09:58 AM
  3. Saving file to its current location and current file name with current date and "FINAL"
    By ironwill20 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-21-2012, 03:22 AM
  4. Look in current workbook location
    By PY_ in forum Excel General
    Replies: 2
    Last Post: 08-05-2010, 02:33 PM
  5. getting current cell location
    By Bytor47 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-25-2008, 02:28 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