Excel 2K3 Macro - Find and Update

K

kdub-u

Hi All-

Trying to write a simple macro to do the following--Here's my basic
excel spreadsheet. So I have a report that spits this information
out....(could be hundreds of records..all different parts)


A B
Part


AFM
AFM
ANT
BAG
BAG
BAG


What I'd like to be able to do is - for every part it finds - its
update the spreadsheet with a location. So first, it would insert an
additional column - and then update the part location.
For example, If the macro finds the part "AFM" - the Location would be

Y--------If the macro finds the part "ANT" - the location would be
G..etc..etc..


A B C
Part Part Location
AFM Y
AFM Y
ANT G
BAG H
BAG H
BAG H


Thanks for any and all help...I dont know how to program macros.
 
J

Joerg

Create a second table showing Location for each part

A B
AFM Y
ANT G
BAG H
etc.

then use the VLOOKUP function (referencing above table) to insert the
corresponding location in column C of your basic data table.
You don't need a macro.

Cheers,

Joerg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top