Thread: Macro Help...
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Kevin B Kevin B is offline
external usenet poster
 
Posts: 1,316
Default Macro Help...

If you sort the pricing table you could use a Vlookup function.

VLOOKUP(Value_To_Lookup, Lookup_TableRange, Column#_of_Return_Value)

For instance, if the the part number your looking up in an cell A1 of Sheet
2, and the pricing table is on Sheet1, cells A1 through B6, and the price of
the part number is in column 2 of the pricing table, the formula below would
return the price.,

=VLOOKUP(A1,Sheet1!$A$1:$B$6,2)
--
Kevin Backmann


"polabonez" wrote:


Can someone help me with a macro / code to perform this task?

I have two excel files, or sheets... One is a list of different part
numbers in column A and their list prices in column B. This is a LIST
PRICE file for a brand of parts my company sells.

On the other sheet, I have a list of part numbers for this brand of
part... maybe 60-70 different numbers. Is there a macro I can run, so
that I do not have to look up all of the list prices individually and
enter them manually? I tried to create a simple macro by recording my
keystrokes but couldn't make it work.

For instance, I would highlight the number I want to get the price on,
switch to the sheet that has the list prices, control F to find the
part no., move one square the the right, copy the price, and paste it
back into my original sheet... However this did not work because the
program always used the number I was pasting to search for, hence using
number 12346 instead of just Pasting it....

I know this may be confusing, but if anyone understands or I can help
you understand the problem better, let me know.

Thanks


--
polabonez
------------------------------------------------------------------------
polabonez's Profile: http://www.excelforum.com/member.php...o&userid=30748
View this thread: http://www.excelforum.com/showthread...hreadid=504138