+ Reply to Thread
Results 1 to 2 of 2

Creating a copy/paste Macro with data from multiple sheets

Hybrid View

  1. #1
    Registered User
    Join Date
    06-12-2014
    Posts
    4

    Post Creating a copy/paste Macro with data from multiple sheets

    Hi,
    I am trying to create an Excel Macro in Visual Basics for a complicated formula for the beginner that I am. I need to take data from one sheet and put it onto another sheet in the same book depending on certain variables.

    Basically what I am trying to do is this:
    If cell D12 from Sheet 1 says "2015" then put the value from cell R12 in cell D9 of Sheet 2.

    This process should continue as such:
    If D13 says "2015" then put the value from R13 in D10.
    If D14 says "2015" then put the value from R14 in D11.
    Etc.

    Also, I need to expand this further in a couple different ways. The first one being:
    If D12 says "2016" then put the value from R12 in cell E9.
    If D13 says "2016" put the value from R13 in cell E10.
    Etc.

    The second one:
    If E12 says "2015" then put the value from R12 in D9.
    If E12 says "2016" then put the value from R12 in E9.
    If F12 says "2015" then put the value from R12 in D9.
    If F12 says "2016" then put the value from R12 in E9.
    Etc.

    Does this make any sense and can it be easily coded?
    If you have a code for this, I would be very grateful!

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,744

    Re: Creating a copy/paste Macro with data from multiple sheets

    To ensure proper testing of any code, it would be helpful if you posted a sample workbook.

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need.
    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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. Help with creating a macro that will copy and paste data to multiple sheets.
    By harkin123 in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 08-19-2013, 06:57 AM
  2. [SOLVED] Copy and Paste Value macro on multiple sheets
    By Elmarie_Potgieter in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-17-2013, 02:15 AM
  3. [SOLVED] Macro to copy, then paste row in multiple sheets not working
    By dystopianprotagonist in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-17-2013, 09:37 PM
  4. [SOLVED] Macro to Copy range from multiple sheets and paste in new Workbook
    By cameron.beyers in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-03-2012, 01:00 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

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