Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have 2 workbooks I am working with.

  • One workbook has an id and a category name.
  • The other workbook shows a name and category section that has an id number (but not the actual description).

Basically I want to copy the full category text to my current workbook from the old one based on the id number into a new column

What kind of formula can I use to check the id number category pair and then copy it into the new workbook in a new column?

Any help is great!

share|improve this question

migrated from stackoverflow.com Nov 7 '12 at 11:00

This question came from our site for professional and enthusiast programmers.

add comment

2 Answers

Old worksheet: Column A: ID The following columns will have descriptions for the ID.

New worksheet: Column A: ID

Cells with a formula will contain information from the old WB (next column to ID for the formula below):

=VLOOKUP($A2,[OldWBName]Sheet1!$A$1:$F$1000,2)

The formula can be copied down, after copying right, ",2)" should be changed to ",3)" etc. to include the next column.

share|improve this answer
    
techonthenet.com/excel/formulas/vlookup.php gives a good overview. –  Jüri Ruut Nov 7 '12 at 9:29
add comment

you can use a vlookup function or otherwise use a VBA script. When you have tried something come back to this forum and ask a specific question please.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.