+ Reply to Thread
Results 1 to 10 of 10

Pasting data from other user defined workbook difficulties

  1. #1
    Forum Contributor
    Join Date
    05-01-2018
    Location
    Maine
    MS-Off Ver
    2010
    Posts
    114

    Pasting data from other user defined workbook difficulties

    Hello all,

    I have been working on this code to
    1. let user pick file
    2. copy all cells that contain data on sheet 1, 2, 3, 4 and over 30
    3. paste into first blank row of source workbook on Sheet 4

    For some reason this seems to only paste one cell into "A" on sheet 4 on the first blank row of source workbook. I cant figure out how to make it copy all data (cells that contain data) from user defined workbook (wb2, with multiple sheets) and paste into source workbook (wb1) on sheet 4 on first blank row. Any help is greatly appreciated.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,026

    Re: Pasting data from other user defined workbook difficulties

    Place this macro in a regular module in the workbook where you want to paste the data in "Sheet4"and run it from there. This will allow you to select a file. The macro will loop through all the sheets in that file and copy them to Sheet4 of the workbook containing the macro.
    Please Login or Register  to view this content.
    The macro assumes that there is data in column A of all the worksheets.
    Last edited by Mumps1; 05-06-2018 at 02:59 PM.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Forum Contributor
    Join Date
    05-01-2018
    Location
    Maine
    MS-Off Ver
    2010
    Posts
    114

    Re: Pasting data from other user defined workbook difficulties

    Jeez, that works really really well. Thank you so much for the help.

  4. #4
    Forum Contributor
    Join Date
    05-01-2018
    Location
    Maine
    MS-Off Ver
    2010
    Posts
    114

    Re: Pasting data from other user defined workbook difficulties

    Quote Originally Posted by Mumps1
    The macro assumes that there is data in column A of all the worksheets.
    Question, (apologies if its already been answered, I cannot seem to find it for the change to usedrange) what if the only place that has constant data is "C". A & B may not have data but are still part of the row?

  5. #5
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    882

    Re: Pasting data from other user defined workbook difficulties

    Cross-posted without a link here
    If my solution worked (or not) please let me know. If your question is answered then please remember to mark it solved

    Computers are like air conditioners. They work fine until you start opening windows. ~Author Unknown

  6. #6
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,026

    Re: Pasting data from other user defined workbook difficulties

    It appears that you may have a solution from JLGWhiz in your other post.

  7. #7
    Forum Contributor
    Join Date
    05-01-2018
    Location
    Maine
    MS-Off Ver
    2010
    Posts
    114

    Re: Pasting data from other user defined workbook difficulties

    I apologize for that. I did not know the two forums were linked. That is now known .

    It seems that code is not also copying and pasting rows based on column "C" instead of "A". I've spent alot of time with it.. but I seem to have issues in getting the looping to work with copying and pasting between worksheets/ workbooks like that. I think it may be something to do with .UsedRange value? Ill keep working on it anyway and really thank you so much for your time... The code above simplified the process and has been a great base for me to play with and try to get it working as im learning all this.

  8. #8
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    882

    Re: Pasting data from other user defined workbook difficulties

    I apologize for that. I did not know the two forums were linked.
    They are not linked but both (as do virtually all Excel forums) have rules concerning cross-posting.

    It might be an idea that you read the rules on both sites, in particular on posting links if you cross-post (including reading the link included in the rule on the other site explaining why it is an issue).

    There is a button/tab near the top of the page to take you to the rules.

    Edit: actually I have posted the link explaining why it is an issue not to post links below just to help...

    Excelguru Help Site - A message to forum cross posters
    Last edited by WasWodge; 05-07-2018 at 11:46 AM.

  9. #9
    Forum Contributor
    Join Date
    05-01-2018
    Location
    Maine
    MS-Off Ver
    2010
    Posts
    114

    Re: Pasting data from other user defined workbook difficulties

    Understood, this makes sense. Thank you.

  10. #10
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,026

    Re: Pasting data from other user defined workbook difficulties

    If you attach a copy of your file, it would make it easier to test a possible solution. De-sensitize the data if necessary.

+ 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. User-defined type not defined when copying macro from one workbook to another
    By Mogles in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-01-2018, 08:08 AM
  2. User form to post data and charts according to user defined selections
    By siroco79 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-12-2013, 11:16 AM
  3. Copy and pasting from a user defined function.
    By Jayhrbrt in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-08-2013, 08:50 AM
  4. How to Copy User defined columns from one workbook to another
    By Mah_OS in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 10-22-2012, 03:49 PM
  5. [SOLVED] Opening workbook in user-defined folder
    By pdberger in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 PM
  6. Opening workbook in user-defined folder
    By pdberger in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 07:05 AM
  7. Opening workbook in user-defined folder
    By pdberger in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 04:05 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