Copying data from one Excel 2007 spreadsheet to another when destination spreadsheet may not contain all same rows

Posted on 2014-03-12
Medium Priority
Last Modified: 2014-03-12
I have two spreadsheets of school names.  One spreadsheet contains 11 columns without headers.  Column K contains data that needs to be copied to the other spreadsheet.

The destination spreadsheet also has 11 columns, but with headers.  The information from Column K of spreadsheet #1 (High-Schools-2014-with-PAAK) needs to be copied to spreadsheet #2 (high-schools-Destination-File).  However, the information in each cell in column K must match with the correct school name.  

Not every school in the destination file appears in the first file, therefore would not have data copied over to column K.  There may be schools in spreadsheet #1 that do not appear in the destination file.  

I need some type of formula that will look at the school name in Column A, copy the data in Column K, and paste into the proper cell in the destination spreadsheet corresponding to the same school name.  

Is this possible?
Question by:gsfc
  • 4
LVL 31

Expert Comment

ID: 39924329

I need some type of formula that will look at the school name in Column A, copy the data in Column K, and paste into the proper cell in the destination spreadsheet corresponding to the same school name.  

You need this as formula ? Could VBA be an option ?

Author Comment

ID: 39924391
I'm not familiar with VBA.  If this is something you can provide to me, perhaps I can sk another in our department to assist me.

Accepted Solution

Thymos68 earned 2000 total points
ID: 39924433
The Vlookup formula would be a simple way to populate that data.  If you're unfamiliar with Vlookup, one could describe it as a means to use to pull the desired data into a cell, by way of a lookup table.  

Vlookup will look down the left side of a table until it finds a cell that matches your reference cell, then deliver the result of a cell in column X (to it's right).

VLookup is written like this: =vlookup (A1,A1:C5,3,false)
    A1=lookup Cell
    A1:C5 = Lookup Table
    3 = Reult from column 3
    false = deliver only if exact match

For your file,

(with both files open) write this formula in the destination cell (K2 in this example):


you then can copy that formula down through the sheet.  Any non-matches will result in #n/a.

The challenge I see however, is you need to have the school names match exactly.  An abbreviated, or alternative name will not result in a match.

Good luck
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.


Author Comment

ID: 39924480
Started off ok, but am receiving #N/A (which I expected) or #REF!  The paak code is found in the High-Schools-2014-with-PAAK-code.xlsx.  Why is it not returning the code?

Author Comment

ID: 39924510
Oops, my fault.  Didn't use absolute cell reference in the formula.  This works like a charm!  Thank you so very much!

Author Closing Comment

ID: 39924513
Wonderful idea, and will be extremely useful in the future.  Also, once I copied down the formula and had the codes in, I copied then pasted special to include just the values so I don't have to rely on the link to the other spreadsheet.  This works for what we needed to do.

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

: Microsoft Office Collaborate for free and online versions of Microsoft  Word, Excel, Powerpoint, OneNote, Onedrive , Email, Calendar etc. In short we can say that Microsoft office is a suite of servers, applications and services developed by  Micr…
Microsoft's Excel has many features that most people will never need nor take advantage of.  Conditional formatting is one feature that you may find a necessity once you start using it.
Viewers will learn how to create a PivotTable and make basic changes to it in Excel 2013.
Viewers will learn the basics of printing in Excel 2013 and how to adjust some common settings.

607 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question