+ Reply to Thread
Results 1 to 12 of 12

Macro To Copy Specific Data From One Sheet And Paste in traspose Into other Sheets

  1. #1
    Registered User
    Join Date
    10-13-2016
    Location
    sINGAPORE
    MS-Off Ver
    2013
    Posts
    9

    Post Macro To Copy Specific Data From One Sheet And Paste in traspose Into other Sheets

    Hi I had data in Sheet1 in different columns and I want to get in other worksheet in Transpose format.

    I had created macro but getting error and only first part is working.
    Table as below

    Date Time (Hrs) Weight of Empty Dish (g) Weight of Dish + Drug (g) Visible Physical Change Total Weight on Exposure (g) Weight Gain (g) Weight Gain per Dose (g) % Weight Gain (g/g) Absoption Rate (g / Hr) Absorption Rate (% / Hr) Absorption Value
    28-Mar-16 0 24.0812 29.6987 No Change 29.6987 0.0000 0.0000 0.0000 0.00000 0.0000 0.0000
    28-Mar-16 2 24.0812 29.6987 Nominal Change 29.7850 0.0863 0.01079 1.5363 0.00539 0.7681 0.0768
    28-Mar-16 4 24.0812 29.6987 Nominal Change 29.7868 0.0881 0.01101 1.5683 0.00275 0.3921 0.0392
    28-Mar-16 6 24.0812 29.6987 Nominal Change 29.7840 0.0853 0.01066 1.5185 0.00178 0.2531 0.0253
    28-Mar-16 8 24.0812 29.6987 Nominal Change 29.7808 0.0821 0.01026 1.4615 0.00128 0.1827 0.0183
    29-Mar-16 24 24.0812 29.6987 Nominal Change 29.8440 0.1453 0.01816 2.5866 0.00076 0.1078 0.0108
    30-Mar-16 48 24.0812 29.6987 Nominal Change 29.9455 0.2468 0.03085 4.3934 0.00064 0.0915 0.0092
    31-Mar-16 72 24.0812 29.6987 Considerable Change 29.9843 0.2856 0.03570 5.0841 0.00050 0.0706 0.0071
    1-Apr-16 96 24.0812 29.6987 Considerable Change 30.2886 0.5899 0.07374 10.5011 0.00077 0.1094 0.0109
    2-Apr-16 120 24.0812 29.6987 Considerable Change 30.3644 0.6657 0.08321 11.8505 0.00069 0.0988 0.0099
    3-Apr-16 144 24.0812 29.6987 Considerable Change 30.5462 0.8475 0.10594 15.0868 0.00074 0.1048 0.0105
    4-Apr-16 168 24.0812 29.6987 Considerable Change 30.8050 1.1063 0.13829 19.6938 0.00082 0.1172 0.0117
    5-Apr-16 192 24.0812 29.6987 Considerable Change 30.8101 1.1114 0.13893 19.7846 0.00072 0.1030 0.0103

    Macro as below

    Please Login or Register  to view this content.
    Last edited by alansidman; 10-18-2016 at 05:32 AM. Reason: code tags added

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

    Exclamation Re: Macro To Copy Specific Data From One Sheet And Paste in traspose Into other Sheets


    Hi !

    Use code tags as per forum rules …

    And you forgot to explain which error on which codeline !

  3. #3
    Registered User
    Join Date
    10-13-2016
    Location
    sINGAPORE
    MS-Off Ver
    2013
    Posts
    9

    Re: Macro To Copy Specific Data From One Sheet And Paste in traspose Into other Sheets

    Hi Marc,
    Thanks for reply
    as I am new user so can explain how to use code tag.
    I started stared new thread by selecting new post.

    when I run the simple macro created by me it shows can not select multiple copy.

    as I have data in K , L M COLOUMNS from different range K10 :K22 , K58: K69 ,K86: K99 IN Sheet1 and want to get this data in Sheet2 in Transpose manner.
    It will be helpful for me.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs
    MS-Off Ver
    MS Office 365
    Posts
    19,520

    Re: Macro To Copy Specific Data From One Sheet And Paste in traspose Into other Sheets

    Code Tags Added
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)

  5. #5
    Registered User
    Join Date
    10-13-2016
    Location
    sINGAPORE
    MS-Off Ver
    2013
    Posts
    9

    Re: Macro To Copy Specific Data From One Sheet And Paste in traspose Into other Sheets

    Dear Alan,
    Thanks for information.
    In future I will follow the forum rules

  6. #6
    Registered User
    Join Date
    10-13-2016
    Location
    sINGAPORE
    MS-Off Ver
    2013
    Posts
    9

    Post Re: Macro To Copy Specific Data From One Sheet And Paste in traspose Into other Sheets

    Hi
    I had updataed code and Macro excel worksheet for getting Copy Specific Data From One Sheet And Paste in traspose Into other Sheet
    sorry for any mistake again as I am new user for using this forum

    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    10-13-2016
    Location
    sINGAPORE
    MS-Off Ver
    2013
    Posts
    9

    Re: Macro To Copy Specific Data From One Sheet And Paste in traspose Into other Sheets

    Hi Alansidman

    Can you help to check the code for copy data values only from sheet 1 to another sheet in Transpose manner.

  8. #8
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs
    MS-Off Ver
    MS Office 365
    Posts
    19,520

    Re: Macro To Copy Specific Data From One Sheet And Paste in traspose Into other Sheets

    What is the error message you get and when you get it, click on debug and what line of code is highlighted?

  9. #9
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs
    MS-Off Ver
    MS Office 365
    Posts
    19,520

    Re: Macro To Copy Specific Data From One Sheet And Paste in traspose Into other Sheets

    This is not a valid VBA procedure for copying

    Please Login or Register  to view this content.
    Try changing this to employing the Application.Union method to consolidate ranges for copying. https://msdn.microsoft.com/en-us/lib.../ff834621.aspx

    Also, I would group some of the ranges: Instead of
    PHP Code: 
    K10:K22,L10:L22,M10:M22 
    change this to
    PHP Code: 
    K10:M22 

  10. #10
    Registered User
    Join Date
    10-13-2016
    Location
    sINGAPORE
    MS-Off Ver
    2013
    Posts
    9

    Re: Macro To Copy Specific Data From One Sheet And Paste in traspose Into other Sheets

    Hi Alansidman

    Thanks for your reply and giving time to me.
    actually I am new user to use VBA
    Basically I want to get data from sh 1 of certain column range to another sh2 with value only in transpose way. when I run my code it does not run.
    giving Highlighted in yellow color. Selection copy.
    on basic info I manually enter data with ref to other ref codeCapture1.JPG

  11. #11
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs
    MS-Off Ver
    MS Office 365
    Posts
    19,520

    Re: Macro To Copy Specific Data From One Sheet And Paste in traspose Into other Sheets

    Read Post 9 for further instructions

  12. #12
    Registered User
    Join Date
    10-13-2016
    Location
    sINGAPORE
    MS-Off Ver
    2013
    Posts
    9

    Re: Macro To Copy Specific Data From One Sheet And Paste in traspose Into other Sheets

    Hi Alansidman,

    Thanks for your reply and giving time to me. As per your suggestion I had modified the code and is is working well without any error.
    I required your help to make it smaller and proper way as per VBA .
    as I make it simple way AND NOT CORRECT WAY.
    I HAD ATTCHED MACRO FILE WITH CODE FOR YOUR REFERENCE.
    Attached Files Attached Files

+ 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 needed to copy data from master sheet to a number of specific sheets
    By krish2503 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-25-2015, 04:42 PM
  2. Need macro to copy data from one sheet and paste to many sheets
    By Gillesrd in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-28-2013, 10:39 PM
  3. Need to copy ranges from multiple sheets then paste to sheet under specific headers
    By the duke in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-13-2013, 12:17 AM
  4. Macro to copy and paste 70+ sheets of data onto 1 sheet
    By Helenew698 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 06-30-2012, 01:49 PM
  5. macro copy/paste lists data from multiple sheets to one comparison sheet
    By johnnieboi89 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-29-2011, 04:22 PM
  6. Replies: 0
    Last Post: 11-19-2009, 09:20 AM
  7. macro to copy specific data from one sheet and paste into two sheets
    By Shogun in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-26-2009, 04:56 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