Sunteți pe pagina 1din 3

Beths #1 Top Secret Excel Trick: VLOOKUP

The two spreadsheets whose data you want to merge both need to have the same unique student identifier in common as in, they both need PEIMS ids. Copy the FROM spreadsheet so that it appears as a sheet in the TO Excel file, or vice versa. You want both spreadsheets to be in the same Excel file. To copy a spreadsheet to another Excel file, RIGHT-CLICK the spreadsheets tab, click MOVE OR COPY, then check CREATE A COPY, and use the down arrow to pick the name of the file you are copying TO.

Prepare the FROM spreadsheet: o o o o PEIMS number needs to be in the first column PEIMS numbers need to be numbers (not numbers stored as text) Sort the data by the PEIMS column, low to high Highlight all of your data, and NAME THE RANGE: Go to the FORMULAS tab, and click DEFINE NAME by Name Manager:

Click OK, once youve entered your name range. My sample name range is taksinfo.

Now you are ready to work your VLOOKUP magic. The V stands for Vertical; it means that the unique values youre using as your link are arranged vertically, in a column. (Theres an HLOOKUP too, but I havent dared to dare) Go to your TO spreadsheet. In my sample, Ive got TAKS test versions and whether or not students met standard on my FROM sheet, and I want those two fields filled in on my TO sheet. In the real world, your TO sheet would of course have lots of other data in it, and you would just be adding these two new pieces of information. Look at my FROM sheet. Notice that Ive got the PEIMS numbers in colunn A, and the data I want the TAKS test and the Met Std are in Columns C and D. C is the 3rd column, and D is the 4th. Thats important. FROM:

In my TO sheet, Im going to click in the cell where I want to pull in data first I want Barbies TAKS test, so I am clicking in B3.

Heres the formula to type: =VLOOKUP(D3, TAKSINFO, 3, FALSE) Heres why you typed that: Formulas always start with an equals sign. VLOOKUP is the formula youre using. D3 is the cell with Barbies PEIMS number which is our secret decoder ring unique element. Actually, you didnt have to TYPE D3, you couldve CLICKED on cell D3 at that point in your formula-typing, and Excel wouldve typed it for you. TAKSINFO is the name of the range you want Excel to go look in. 3 refers to the column from which you want it to fetch data. I dont know why you have to type FALSE, but you do.

So to get Barbies Met Std data, click in cell C3, and type =VLOOKUP (D3, TAKSINFO, 4, FALSE) If you get a result of #NA, that means Excel couldnt find a match in other words, the PEIMS number you were looking for did not exist on the FROM sheet.

Once youve typed the formulas for Barbie, you can grab cells B3 and C3 and copy those formulas into the rest of the cells (for Beth, Colt, Dez, etc). Note: see how when I clicked on cell B3, it says TAKSM in the cell, but up in the formula bar, it says the formula? Well if you want to copy/paste this data into anything else, if you just highlight and do copy-paste, it will paste the FORMULA, not the value. So what I usually do, once I have everything filled in and I know its right, is this: highlight the whole spreadsheet, and do COPY-PASTE (I do CTRL-C, then CTRL-V), and when you see the little clipboard, click it, and choose VALUES ONLY. That means you are essentially replacing your formulas with the values.

S-ar putea să vă placă și