+ Reply to Thread
Results 1 to 10 of 10

Data Disappearing into the twilight zone, Copy Cells marco mystery

  1. #1
    Forum Contributor
    Join Date
    03-30-2015
    Location
    Northampton
    MS-Off Ver
    2010
    Posts
    275

    Data Disappearing into the twilight zone, Copy Cells marco mystery

    i have the following code

    Please Login or Register  to view this content.
    as stated in code "Invoice" is sheet 15 and "Invoice Database" is sheet 16. the code does not throw up any errors but when i go to look at the "Invoice Database" in the copied information is nowhere to be found hence "Twilight Zone".

    i need the information to start entering on cell B19:F19 then as the invoices are produced they create a Database list.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,865

    Re: Data Disappearing into the twilight zone, Copy Cells marco mystery

    Have your tried to step through the code (F8) and look at what is happening step by step? If you are unsure about how to do this, click on the link in my signature block for Chip Pearson's tutorial on debugging code.
    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
    03-30-2015
    Location
    Northampton
    MS-Off Ver
    2010
    Posts
    275

    Re: Data Disappearing into the twilight zone, Copy Cells marco mystery

    ok i had a little play around on the invoice sheet itself and adjusted the range called "Invoice" and its now showing up on the Database sheet but i need the data to go into B18 then next invoice would go into B19 etc etc but i also have another issue of its throwing up an error and highlighting with ants my "invoice Range".

    im really not sure whats going on here. could someone please assist me.

    also im offset "invoice" in not working correctly (Name Manager)

  4. #4
    Forum Contributor
    Join Date
    03-30-2015
    Location
    Northampton
    MS-Off Ver
    2010
    Posts
    275

    Re: Data Disappearing into the twilight zone, Copy Cells marco mystery

    i did the step through and it skips this part of the code

    Please Login or Register  to view this content.

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,865

    Re: Data Disappearing into the twilight zone, Copy Cells marco mystery

    Instead of using the Named Range "Invoice", suggest you define the range in the VBA and set it. Then use the defined name with out the quotation marks.

  6. #6
    Forum Contributor
    Join Date
    03-30-2015
    Location
    Northampton
    MS-Off Ver
    2010
    Posts
    275

    Re: Data Disappearing into the twilight zone, Copy Cells marco mystery

    i did that and now it skips

    Please Login or Register  to view this content.
    Last edited by Learning ExL; 04-19-2015 at 05:13 AM.

  7. #7
    Forum Contributor
    Join Date
    03-30-2015
    Location
    Northampton
    MS-Off Ver
    2010
    Posts
    275

    Re: Data Disappearing into the twilight zone, Copy Cells marco mystery

    ive managed to stop the error however i cant get the data destination correct it sitting in Cols R27:V27 instead of B19:F19 down

  8. #8
    Forum Contributor
    Join Date
    03-30-2015
    Location
    Northampton
    MS-Off Ver
    2010
    Posts
    275

    Re: Data Disappearing into the twilight zone, Copy Cells marco mystery

    ok managed to get it to paiste to the right place now it just no offsetting correctly it just over writing what is already there

  9. #9
    Forum Contributor
    Join Date
    03-30-2015
    Location
    Northampton
    MS-Off Ver
    2010
    Posts
    275

    Re: Data Disappearing into the twilight zone, Copy Cells marco mystery

    thank you.

  10. #10
    Valued Forum Contributor
    Join Date
    08-22-2011
    Location
    Auckland
    MS-Off Ver
    Excel 2019
    Posts
    716

    Re: Data Disappearing into the twilight zone, Copy Cells marco mystery

    I stand to be corrected here by excel minds much greater than mine, which is not hard.
    If you fully qualify your code with something like the code below, you should have a lot less or no problems with the results going west.
    There are other ways of doing the qualifying, but I find this way more readable, especially when coming back to it after a period of time.
    I once spent ages formatting a sheet only for me to destroy it in a blink of an eye when I had things go wrong in a big way. Qualifying
    my code sorted that out. By using a variable name for a worksheet in your code you can give than sheet any tab name you like & change it at will & it won't affect the macro. If you treat excel as if it's as thick as 2 short planks & has to be told exactly what to do, you
    shouldn't go wrong.

    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. [SOLVED] Need help vb marco copy a range of data to a template
    By venkatpvc in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-08-2013, 07:46 PM
  2. Macro help for compiling data to randomly blank cells
    By bigkahuna2187 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-02-2012, 12:45 PM
  3. [SOLVED] How to use marco to copy a selected continuous range of cells
    By AlecWong in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-21-2012, 02:52 PM
  4. Marco for copy data from pivot table
    By ronlau123 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-02-2011, 04:21 PM
  5. The mystery of the disappearing querytables
    By alderran in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-17-2008, 04:42 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