+ Reply to Thread
Results 1 to 3 of 3

How to Create a macro to copy over multiple cells in a certain row based on a cells value

  1. #1
    Registered User
    Join Date
    01-08-2016
    Location
    Las Vegas, NV
    MS-Off Ver
    Microsoft Office Professional Plus 2010
    Posts
    1

    How to Create a macro to copy over multiple cells in a certain row based on a cells value

    I need help to create a macro to copy over from one sheet of data to another sheet of data. It would transfer over data from rows based on the value of the data in specific cell in that row. I don't want the information to be repeated. It will be taken from the first sheet (picture 1) and transferred to the 2nd sheet (picture 2). Based on the final column will determine if it was goes under resignation or term


    excel picture.PNG

    excel picture 2.PNG

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,908

    Re: How to Create a macro to copy over multiple cells in a certain row based on a cells va

    Hi and welcome to the forum

    Pictures are of little value. Honestly, no one wants to re-type your data to try and solve your issue. Additionally, we would only be guessing at how your data was structured, ie. formulas, formatting, etc.

    Please attach a sample file that represents what you have. The structure of your attachment should be the same structure as your actual data. Any proprietary information should be changed.

    Include in the attachment any code you're currently using (whether it works or not) and an "After" of what you wish the output to be.

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    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

  3. #3
    Forum Contributor
    Join Date
    01-08-2016
    Location
    Cagayan De Oro City, Philippines
    MS-Off Ver
    2013
    Posts
    152

    Re: How to Create a macro to copy over multiple cells in a certain row based on a cells va

    here is some theory and a little code to get you started...... not sure if you have started anything yet or how familiar you are with vba so here goes nothing

    put all the data into variables (standard procedure)
    Loop through the table holding the data you want to transfer first
    inside this loop, loop through the other table and check if the record exists (or forget this loop and just remove duplicates later up to you)
    if your clear to add the record check the column you needed to check if its resignation put resignation, if not put term...
    finished....

    Please Login or Register  to view this content.


    Sorry about the formatting, this will give you something to play with anyway, its using arrays and rngs so you can see how they work..

    Thanks
    Paul S.
    Last edited by gbeats101; 01-08-2016 at 11:50 PM. Reason: Missed something in the code

+ 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. Replies: 3
    Last Post: 07-16-2014, 03:24 PM
  2. Generating Macro to create multiple duplicate cells based on an input reference
    By Jomian in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-05-2013, 08:25 PM
  3. [SOLVED] Macro to copy and paste cells on multiple sheets based on dates
    By canyflyer in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 08-21-2013, 06:24 PM
  4. Excel Macro to insert two rows based on condition and copy and paste multiple cells
    By mannabhalo in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-13-2012, 12:56 PM
  5. Macro which finds and copy's cells based on values in other cells.
    By ScabbyDog in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-24-2012, 05:11 AM
  6. Replies: 0
    Last Post: 07-10-2006, 04:34 PM

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