Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
tom tom is offline
external usenet poster
 
Posts: 570
Default Get info from second sheet

I have a training spreadsheet that has courses and names. We are importing
to a new training system and need to put new codes with the old course names.
There are about 11,000 lines and it is in Excel 2007. The first sheet has
all of the old information, person's name, date of training, and old course
number or name. The second sheet has the course info, old and new numbers.
Is there a macro that will start at the second line (headers on first line)
take the old course number from the first sheet, match it with the old number
on the second sheet, fill in the new number in a blank column on the first
sheet. then move to the next line and repeat until it is finished. I can use
paste special if there is a way to display the correct info from the second
sheet with an equation in each cell of the currently blank column.

Thanks in advanced for the help.
--
Tom
  #2   Report Post  
Posted to microsoft.public.excel.programming
tom tom is offline
external usenet poster
 
Posts: 570
Default Get info from second sheet

Can I use lookup?
--
Tom


"Tom" wrote:

I have a training spreadsheet that has courses and names. We are importing
to a new training system and need to put new codes with the old course names.
There are about 11,000 lines and it is in Excel 2007. The first sheet has
all of the old information, person's name, date of training, and old course
number or name. The second sheet has the course info, old and new numbers.
Is there a macro that will start at the second line (headers on first line)
take the old course number from the first sheet, match it with the old number
on the second sheet, fill in the new number in a blank column on the first
sheet. then move to the next line and repeat until it is finished. I can use
paste special if there is a way to display the correct info from the second
sheet with an equation in each cell of the currently blank column.

Thanks in advanced for the help.
--
Tom

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 118
Default Get info from second sheet

Tom

I think the best way to do this is to use vlookup. You need to make sure
that old number is the leftmost column in the lookup array. then you put this
into sheet 1 where you want to new number to be placed:

=VLOOKUP(Sheet1!<old number cell, Sheet!2<array with old and new numbers,
FALSE)

The FALSE argument ensures that only exact matches are found so you DON'T
need to sort your old numbers in ascending order.

If this helps, please click "Yes"
<<<<<<<<<<<


"Tom" wrote:

Can I use lookup?
--
Tom


"Tom" wrote:

I have a training spreadsheet that has courses and names. We are importing
to a new training system and need to put new codes with the old course names.
There are about 11,000 lines and it is in Excel 2007. The first sheet has
all of the old information, person's name, date of training, and old course
number or name. The second sheet has the course info, old and new numbers.
Is there a macro that will start at the second line (headers on first line)
take the old course number from the first sheet, match it with the old number
on the second sheet, fill in the new number in a blank column on the first
sheet. then move to the next line and repeat until it is finished. I can use
paste special if there is a way to display the correct info from the second
sheet with an equation in each cell of the currently blank column.

Thanks in advanced for the help.
--
Tom

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Vlookup

Using Vlookup is probably the fastest way to get the job done

Let's assume Sheet 1 has the 'old' number in Cell A2 and the old (resp. new) numbers are on Sheet2, in B2 (resp. c2) then the formula in cell B2 (sheet 1) will be :

=Vlookup(a2;Sheet2!B:C;2;false)

A2 = reference of value to look for
Sheet2!B:C = tells Excel in which columns the 'Old' and 'New' values are
2 = will return whatever is in the 2nd column (here 'C')
False = Will only return full matches (even slight differences will return an error)



Tom wrote:

Get info from second sheet
09-Nov-09

I have a training spreadsheet that has courses and names. We are importing
to a new training system and need to put new codes with the old course names.
There are about 11,000 lines and it is in Excel 2007. The first sheet has
all of the old information, person's name, date of training, and old course
number or name. The second sheet has the course info, old and new numbers.
Is there a macro that will start at the second line (headers on first line)
take the old course number from the first sheet, match it with the old number
on the second sheet, fill in the new number in a blank column on the first
sheet. then move to the next line and repeat until it is finished. I can use
paste special if there is a way to display the correct info from the second
sheet with an equation in each cell of the currently blank column.

Thanks in advanced for the help.
--
Tom

Previous Posts In This Thread:

EggHeadCafe - Software Developer Portal of Choice
XML Data Compression / Decompression Over the Wire
http://www.eggheadcafe.com/tutorials...ssion--de.aspx
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating form on sheet 1 and having info move to sheet 2 SHARON Excel Discussion (Misc queries) 4 June 1st 09 05:01 PM
Annual Wages Sheet to pick up info from Time Sheet stallence Excel Worksheet Functions 2 May 5th 08 11:02 PM
Finding Info from sheet 1 and removing only those rows from sheet Johnny B[_2_] Excel Discussion (Misc queries) 1 March 28th 07 02:29 PM
How do I compare info in on sheet to info in another? Fanney Excel Discussion (Misc queries) 7 February 25th 06 02:16 AM
transfering info from one sheet to another based on info being transferred CClarke Excel Programming 0 January 14th 04 08:04 PM


All times are GMT +1. The time now is 11:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"