+ Reply to Thread
Results 1 to 15 of 15

Issues copying data to another sheet

  1. #1
    Registered User
    Join Date
    01-23-2022
    Location
    uk
    MS-Off Ver
    MS Office 365
    Posts
    27

    Issues copying data to another sheet

    Hi,

    Really having issues copying data to another sheet, i have tried copy/paste, copy dest, value = value, array etc. i have also tried all the manual calculation, nodisplayalerts and all the other usual things. When running on a non shared workbook with others, it works perfect no issues can run as many times as you wanted instantly, soon i share the workbook with others, thats when the fun begins, usually the first time it will run fine and fairly quick, the second time onwards, i could go and make myself a cup of tea/coffee before it completes. the status bar shows filling cells and the turtle with a pencil comes out writing out the cells. i have spent the last week pulling my hair out and searching all over the web and cannot find anything.

    I have tried creating a new sheet incase there was an issue with the old still the same, tried disabling track history, on the local HDD, on the network, original i was copying from another workbook, so i have tried in the same workbook, all the same. below is the latest code im trying, i dont fully understand it as not used arrays before, but seems to work no shared. i will eventually have this putting data on multiple sheets, on a for loop somehow, but at the moment i need to get it working on one sheet. What am i missing ? seems like its not closing of previous run.

    Please Login or Register  to view this content.

    Sample data

    Site Emp # FirstName LastName InTimestamp OutTimestamp ScheduledShiftID
    1234 987654321 Joe Bloggs 26/09/2023 10:00 26/09/2023 16:00 11456259
    1234 876543210 Jane Doe 29/09/2023 10:00 29/09/2023 16:00 11456261
    1234 765432109 Captin America 03/10/2023 10:00 03/10/2023 16:00 11485315
    Attached Files Attached Files
    Last edited by jynxy; 09-25-2023 at 06:00 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,853

    Re: Issues copying data to another sheet

    There are instructions at the top of the page explaining how to attach your sample workbook (yellow banner: HOW TO ATTACH YOUR SAMPLE WORKBOOK). Screenshots are of little practical use as we cannot manipulate them.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    01-23-2022
    Location
    uk
    MS-Off Ver
    MS Office 365
    Posts
    27

    Re: Issues copying data to another sheet

    aligw file attached, just need to press the blue button for it to run, when running unshared works fine everytime, now try shareworkbook legacy, first time works fine, second time takes ages.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,853

    Re: Issues copying data to another sheet

    Administrative Note:

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not told us about this. You are required to do so. Cross-posts are allowed but you must provide a link to your posts on other sites.

    Please see Forum Rule #7 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important: https://excelguru.ca/a-message-to-forum-cross-posters/

    (Note: this requirement is not optional. No help to be offered until you provide a link or, for members with fewer than 10 posts, a comment telling us where else you have posted this query.)

  5. #5
    Registered User
    Join Date
    01-23-2022
    Location
    uk
    MS-Off Ver
    MS Office 365
    Posts
    27

    Re: Issues copying data to another sheet

    Sorry didnt realise this was against rules and so hard to ask for help these days. Happy to update with what is needed, sorry if i sound rude.

    Also posted on mr excel, but as i cannot add links, bit off a hard request to answer.

    Thanks

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,853

    Re: Issues copying data to another sheet

    You have made 10 posts so you CAN post the link in your next post, however if you read my post fully, you will see that I said you could tell us WHERE you had posted if you had fewer than 10 posts.

    Please post the link in your response to this and read the information at the link I provided to understand why we ask you to do this (it's NOT against the rules, but not telling us about it is).

  7. #7
    Forum Contributor
    Join Date
    07-21-2021
    Location
    Norfolk, UK
    MS-Off Ver
    Excel 2003, 2007, 2013, 2019
    Posts
    212

    Re: Issues copying data to another sheet

    The most obvious potential code error comes here
    Please Login or Register  to view this content.
    The Format function expects a long integer or a "double" decimal value, not a string like "23/09/2023".
    Regards,

    Stephen

  8. #8
    Registered User
    Join Date
    01-23-2022
    Location
    uk
    MS-Off Ver
    MS Office 365
    Posts
    27

    Re: Issues copying data to another sheet

    @swaatacba thanks for your reply, not 100% on your answer did you mean 45192 instead of the date ? i removed the if and tried without the date part and still the same looks like either way makes no difference.

    This is the other link for reference. https://www.mrexcel.com/board/thread...sheet.1245753/

  9. #9
    Forum Contributor
    Join Date
    07-21-2021
    Location
    Norfolk, UK
    MS-Off Ver
    Excel 2003, 2007, 2013, 2019
    Posts
    212

    Re: Issues copying data to another sheet

    Yes, 45192 is the underlying number version of the date. However "Date1" is also a string but in the American date format.

    This is being compared with a date/time stamp from your data table, which similarly has been coverted to an American style date format with no time element.

    Please Login or Register  to view this content.

  10. #10
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,206

    Re: Issues copying data to another sheet

    This works OK

    Please Login or Register  to view this content.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  11. #11
    Registered User
    Join Date
    01-23-2022
    Location
    uk
    MS-Off Ver
    MS Office 365
    Posts
    27

    Re: Issues copying data to another sheet

    Hi @JohnTople i have tried this and makes no difference second time running when shared its still running slow and showing Filling Cells, same if i remove the IF date.

  12. #12
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,206

    Re: Issues copying data to another sheet

    "Shareworkbook" has been replaced by "co-authoring" so perhaps you should investgate this option

    https://support.microsoft.com/en-us/...2-c1c59a628534

  13. #13
    Valued Forum Contributor
    Join Date
    12-30-2020
    Location
    Odessa / Ukraine
    MS-Off Ver
    2021
    Posts
    301

    Re: Issues copying data to another sheet

    Hello @jynxy. What about optimization? Will there be a difference in how the code works?
    Please Login or Register  to view this content.
    UPDATE!
    Try the following code to see how it works for you and how
    Will the given code be performance-wise?
    Please Login or Register  to view this content.
    Last edited by MikeVol; 09-25-2023 at 01:07 PM. Reason: Update

  14. #14
    Registered User
    Join Date
    01-23-2022
    Location
    uk
    MS-Off Ver
    MS Office 365
    Posts
    27

    Re: Issues copying data to another sheet

    @MikeVol thanks, i have tried your suggestion and seems to work the best,

    @JohnTopley ive tried to share and can only have one user at a time, so will have to look into this. also seems a pain to get to the excel app.
    Last edited by jynxy; 09-28-2023 at 05:46 AM.

  15. #15
    Registered User
    Join Date
    01-23-2022
    Location
    uk
    MS-Off Ver
    MS Office 365
    Posts
    27

    Re: Issues copying data to another sheet

    How do you mark this as answered ?

+ 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: 3
    Last Post: 03-08-2017, 03:51 PM
  2. Issues copying data from one workbook to another
    By chrisellis250 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-29-2016, 11:46 AM
  3. Having issues copying data across in to specific table
    By chrisellis250 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-26-2016, 06:45 AM
  4. Replies: 2
    Last Post: 03-12-2013, 03:16 PM
  5. Issues copying from worksheets into a summary sheet
    By tmc101 in forum Excel General
    Replies: 2
    Last Post: 01-21-2013, 09:35 AM
  6. [SOLVED] Code from tigeravatar ,Copying data from one sheet and copying it
    By DanielRay in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 12-07-2012, 03:07 PM
  7. Replies: 1
    Last Post: 04-30-2012, 06:57 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