+ Reply to Thread
Results 1 to 23 of 23

Some of data is missing while copying DATA from one workbook to another

  1. #1
    Forum Contributor
    Join Date
    08-10-2016
    Location
    Pakistan
    MS-Off Ver
    365
    Posts
    242

    Some of data is missing while copying DATA from one workbook to another

    I am trying to copy data from closed workbook to main workbook but when it copies the data, in some portion data is missing in Column C, Please Help

    File names (attached are the files)
    Copying data to: Dash.xlsm
    Copying data from:farmers history gradewise.xlsx


    Please Login or Register  to view this content.
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by Zahid0111; 05-19-2020 at 09:18 AM. Reason: Snapshot of blank area added as an example

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: Some of data is missing while copying DATA from one workbook to another


    So use the classic way with both workbooks opened during the copy …

  3. #3
    Forum Contributor
    Join Date
    08-10-2016
    Location
    Pakistan
    MS-Off Ver
    365
    Posts
    242

    Re: Some of data is missing while copying DATA from one workbook to another

    @Marc L Is it the issue that data is being copied from closed workbook? i don,t think so... some how what do you suggest, how can i grab the data?
    Also i want to skip the HEADERS which are occurring after every 60 rows, as shown in attached picture.
    Attached Images Attached Images
    Last edited by Zahid0111; 05-19-2020 at 09:24 AM.

  4. #4
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: Some of data is missing while copying DATA from one workbook to another


    As your code works only with smart worksheets …

    So restart from the Macro Recorder then once activated, open each workbook, copy data …
    You will get your own code base and if you need some optimization you will have to post it here …

  5. #5
    Forum Contributor
    Join Date
    08-10-2016
    Location
    Pakistan
    MS-Off Ver
    365
    Posts
    242

    Re: Some of data is missing while copying DATA from one workbook to another

    Okay..will try it...

  6. #6
    Valued Forum Contributor Eastw00d's Avatar
    Join Date
    02-29-2020
    Location
    Breda, NL
    MS-Off Ver
    2016, 2019
    Posts
    833

    Re: Some of data is missing while copying DATA from one workbook to another

    Hi Zahid, it depends on (the poor) quality of the file farmers history grade.
    At row 550 and below column B/C is dissappearing.... or merging into each other; anyway column D (Grade) is becoming column C (Grade) and later on switching back.
    I do not have a quick solution for that.
    Cheers
    Erwin
    I started learning VBA because I was lazy ...
    Still developing.... being more lazy...

  7. #7
    Forum Contributor
    Join Date
    08-10-2016
    Location
    Pakistan
    MS-Off Ver
    365
    Posts
    242

    Re: Some of data is missing while copying DATA from one workbook to another

    Hi Erwin, Thank you for kind reply...
    I can wait, please if you can help me. otherwise i won,t force ...You have always been grateful and helpful..

  8. #8
    Valued Forum Contributor Eastw00d's Avatar
    Join Date
    02-29-2020
    Location
    Breda, NL
    MS-Off Ver
    2016, 2019
    Posts
    833

    Re: Some of data is missing while copying DATA from one workbook to another

    Goodmorning,
    Let's see if this is working for you:
    Please Login or Register  to view this content.
    Cheers
    Erwin
    Attached Files Attached Files

  9. #9
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: Some of data is missing while copying DATA from one workbook to another

    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    08-10-2016
    Location
    Pakistan
    MS-Off Ver
    365
    Posts
    242

    Re: Some of data is missing while copying DATA from one workbook to another

    Thank you Erwin..Fantastically working... Great Job...Just a question is it dynamic(i mean if data position changes in same column, will it work)?
    Last edited by Zahid0111; 05-20-2020 at 03:19 AM.

  11. #11
    Valued Forum Contributor Eastw00d's Avatar
    Join Date
    02-29-2020
    Location
    Breda, NL
    MS-Off Ver
    2016, 2019
    Posts
    833

    Re: Some of data is missing while copying DATA from one workbook to another

    As long as these data, only "Grade" and "No. Of Bales" are switching to columns C and E it should be no problem.
    If the other columns are going to dance around, you really should consider other meanings of collecting this data.

    Cheers
    Erwin

  12. #12
    Forum Contributor
    Join Date
    08-10-2016
    Location
    Pakistan
    MS-Off Ver
    365
    Posts
    242

    Re: Some of data is missing while copying DATA from one workbook to another

    Great..Then it will work..Thank You Erwin...Stay Blessed..

  13. #13
    Forum Contributor
    Join Date
    08-10-2016
    Location
    Pakistan
    MS-Off Ver
    365
    Posts
    242

    Re: Some of data is missing while copying DATA from one workbook to another

    Quote Originally Posted by jindon View Post
    Please Login or Register  to view this content.
    @Jindon working fantastic..great work...
    One question please, how can we skip/delete the rows which are highlighted in attached pictures, as there are alot of them...
    Attached Images Attached Images
    Last edited by Zahid0111; 05-20-2020 at 04:10 AM.

  14. #14
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: Some of data is missing while copying DATA from one workbook to another

    Replace the GetLineUp function with
    Please Login or Register  to view this content.

  15. #15
    Forum Contributor
    Join Date
    08-10-2016
    Location
    Pakistan
    MS-Off Ver
    365
    Posts
    242

    Re: Some of data is missing while copying DATA from one workbook to another

    Thanks Jindon...but now i think it is skiping a lot of data by using above function... as you can see in attached picture, before this function there were 6582 rows and after inserting new function it is giving me 4586 rows(means it is skipping data), can you please check...will appreciate it ...
    Attached Images Attached Images

  16. #16
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: Some of data is missing while copying DATA from one workbook to another

    Run this and filter the result in Col.C by "Grade"

    You will have 3964 rows out of 6614 total record.
    Please Login or Register  to view this content.

  17. #17
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: Some of data is missing while copying DATA from one workbook to another

    Added autofilter at the end
    Please Login or Register  to view this content.

  18. #18
    Forum Contributor
    Join Date
    08-10-2016
    Location
    Pakistan
    MS-Off Ver
    365
    Posts
    242

    Re: Some of data is missing while copying DATA from one workbook to another

    Now this is what i want..Great..it,s fine now...Thank you Jindon...Stay Blessed..

  19. #19
    Forum Contributor
    Join Date
    08-10-2016
    Location
    Pakistan
    MS-Off Ver
    365
    Posts
    242

    Re: Some of data is missing while copying DATA from one workbook to another

    Sorry Jindon, while i copied the code to my original dashboard, it is pasting data in my dashboard sheet which is "Bherkund" but i want the data to be pasted on sheet "RawDataBher" as shown in picture...can you please check what,s the issue
    Attached Images Attached Images

  20. #20
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: Some of data is missing while copying DATA from one workbook to another

    Where did you place the code?

    If it it is on Bherkund sheet code module, move the code on to Standard code module.

  21. #21
    Forum Contributor
    Join Date
    08-10-2016
    Location
    Pakistan
    MS-Off Ver
    365
    Posts
    242

    Re: Some of data is missing while copying DATA from one workbook to another

    Yes it was in Bherkund sheet code module. And as you instructed moved to standard module, now it,s working properly...But is it necessary to put it in standard module? why it don,t work there?
    I mean i have alot of sheets, i was about to put them their but now i have to create separate modules for them...

  22. #22
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: Some of data is missing while copying DATA from one workbook to another

    You have the line
    Please Login or Register  to view this content.
    However, if the code is placed in a worksheet code module, Range/Cells without referencing the sheet, it belongs to the sheet that the code is written.

    Please Login or Register  to view this content.
    So,
    Please Login or Register  to view this content.

  23. #23
    Forum Contributor
    Join Date
    08-10-2016
    Location
    Pakistan
    MS-Off Ver
    365
    Posts
    242

    Re: Some of data is missing while copying DATA from one workbook to another

    Okay Great...Thank you..

+ 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. Finding identitcal entries in two sheets and copying missing data
    By jk2017j in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-03-2019, 10:55 AM
  2. [SOLVED] copying info in a column with missing data
    By charliec in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-16-2018, 07:29 PM
  3. [SOLVED] copying data from a filtered list with missing data
    By charliec in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-29-2017, 03:45 PM
  4. Copying data in Cells with macro which adds the data to other parts of workbook $30
    By switzd0d in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 06-24-2015, 08:24 AM
  5. Copying a range of data into another Master workbook below existing data
    By Grizz in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-24-2014, 06:24 AM
  6. Replies: 1
    Last Post: 04-01-2006, 03:50 PM

Tags for this Thread

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