+ Reply to Thread
Results 1 to 15 of 15

VBA Copies but Paste data in another columns(not in required)

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

    VBA Copies but Paste data in another columns(not in required)

    Below VBA copies data from file Report.xlsx and paste in workbook Dash at sheet "RawDataBher". I want to paste the data at column A to E but it paste at Column A & B and leave Columns C & D blank and other data is pasted at column e,f,g as shown in attached picture. Please Help
    Attached are the workbooks
    Please Login or Register  to view this content.
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,143

    Re: VBA Copies but Paste data in another columns(not in required)

    The "C:D" columns are empty because in your "Report.xlsx" file, they are merged columns - you have to reorganize the data layout, without merged cells in the columns ("B:D").

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

    Re: VBA Copies but Paste data in another columns(not in required)

    Can you please help me, how can i clean the data please?

  4. #4
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,143

    Re: VBA Copies but Paste data in another columns(not in required)

    See here:

    https://support.office.com/en-us/art...f-c673a93fcedf

    , but before you do that, look carefully at the range of cells "A3662:G3733" and organize the data here - the data layout is "very broken".

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

    Re: VBA Copies but Paste data in another columns(not in required)

    Okay Thankyou..let me see.

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

    Re: VBA Copies but Paste data in another columns(not in required)

    Please Login or Register  to view this content.

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

    Re: VBA Copies but Paste data in another columns(not in required)

    @jindon Thank you it,s copying but with a little mess, as shown in attached picture. By searching 080019000212, at this position data is not in good shape as suggested by porucha vevrku.Now as i have converted this from PDF to excel, it is going to be difficult to handle it i think, therefore i converted it to word document, can we now fetch the data from this docx file to excel please, attached is word file too
    Attached Images Attached Images
    Attached Files Attached Files

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

    Re: VBA Copies but Paste data in another columns(not in required)

    Try change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    Or F5...
    Last edited by jindon; 04-30-2020 at 07:32 AM.

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

    Re: VBA Copies but Paste data in another columns(not in required)

    No, it has started more problems as shown in attached pictures...In some areas it is skipping Grade data and some areas it is pasting..
    Attached Images Attached Images

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

    Re: VBA Copies but Paste data in another columns(not in required)

    How do you want it then?

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

    Re: VBA Copies but Paste data in another columns(not in required)

    Quote Originally Posted by jindon View Post
    Try change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    Or F5...
    Have you tried F5, instead of F6?

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

    Re: VBA Copies but Paste data in another columns(not in required)

    Yes i tried but then it skips alot of data. With due respect, there are two options:
    1) we need to clean the data as shown in attached two pictures, data needs to be organized but it will be difficult
    2) i have tried below code which copies data from word document to excel, it works but with some mess, i m posting the code along with pictures in next comment please
    Attached Images Attached Images

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

    Re: VBA Copies but Paste data in another columns(not in required)

    code to copy from word file but i don,t know why it takes too much time while running. attached are snapshots of some data with mess along with word file
    Please Login or Register  to view this content.
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by Zahid0111; 04-30-2020 at 08:17 AM.

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

    Re: VBA Copies but Paste data in another columns(not in required)

    All your uploaded codes were originally written by myself.

    Maybe someone else will come with the other method, so forget about all my codes.
    Last edited by jindon; 04-30-2020 at 08:51 AM.

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

    Re: VBA Copies but Paste data in another columns(not in required)

    Exactly but i thought you may look into the code along with the word file, if it needs some modification, so you can do it, if possible. It,s upto you..no worries..You are such a nice person and i respect for your kind time and help. otherwise, i may wait for someone else help but i know you have extra capabilities. well thank you jindon for help.

+ 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] Macro that copies a formula to another sheet and copies data at same time
    By Newbienewbster0932 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-26-2017, 02:49 PM
  2. Replies: 3
    Last Post: 06-29-2016, 01:38 PM
  3. Required VBAcoding to paste data
    By thermax1829 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-23-2014, 08:28 AM
  4. Macro that copies data from one sheet and pastes it to another x columns to the right
    By Stevebarnes in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-30-2013, 12:26 PM
  5. macro that copies data in cell and paste it to cell x columns to right in shhet
    By Stevebarnes in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-27-2013, 12:14 PM
  6. [SOLVED] Macro that copies every 600 rows and paste data in new spreadsheet
    By Bealey in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-27-2012, 09:38 AM
  7. [SOLVED] HOW SHOULD I IMPORT & PASTE ONLY THE REQUIRED DATA
    By amar kayala in forum Excel General
    Replies: 0
    Last Post: 01-06-2006, 09:50 AM

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