+ Reply to Thread
Results 1 to 2 of 2

Match Common Variable Across Sheets and Copy a Variable

  1. #1
    Registered User
    Join Date
    10-24-2014
    Location
    DC
    MS-Off Ver
    Mac 14.4.5
    Posts
    6

    Match Common Variable Across Sheets and Copy a Variable

    Hello,

    I am hoping to get some assistance on a problem that will otherwise require a lot of manual entry and time (~10,000 entries), and I was thinking that a macro code might be the easiest solution. I am new to Excel and have very little experience writing macro code and was hoping that I will be able to get some help here.

    I have two sheets that have different information for a set of patients. I need to insert one variable in Column C of Sheet 2 into Column Z of Sheet 1. Unfortunately, all of the patients in Sheet 2 are not in Sheet 1, but all of the patients in Sheet 1 are in Sheet 2, thus a simple ordering of the patients by their IDs and copying and pasting the columns will not work.

    The basic layout of Sheet 1 is:
    Column A Patient ID Column C ... Column Y
    junk 123456 junk junk
    junk 234567 junk junk

    The basic layout of Sheet 2 is:
    Column A Patient ID Column C
    junk 123456 Variable x
    junk 112345 Variable y
    junk 234567 Variable z

    The desired outcome will be:
    Column A Patient ID Column C ... Column Y Column Z
    junk 123456 junk junk Variable x
    junk 234567 junk junk Variable z

    Thank you in advance for the help!

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Match Common Variable Across Sheets and Copy a Variable

    Please Login or Register  to view this content.

+ 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. Summing variable values across variable sheets in multiple columns
    By rdelosh74 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-27-2014, 02:16 PM
  2. Search variable number of sheets to find partial match on name
    By carolmwondering in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-19-2014, 01:44 PM
  3. [SOLVED] copy common cells and variable range from multiple worksheets to single master workbook
    By tg7384 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 04-15-2014, 03:05 PM
  4. [SOLVED] creating a variable range in VBA to be copied to variable sheets
    By adamNBU in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-29-2013, 06:20 PM
  5. [SOLVED] Looking to combine info from 2 sheets into 3rd but need to match variable record numbers
    By dawatcher in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-24-2012, 06:22 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