Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using Visual 6.5
I am trying to get my worksheet to find the match of a number in column SUPC on workbook 1, in a SUPC column in workbook 2. When it finds that number, I want to to return the number in Price column of workbook 2 into Cost column on worksheet 1. I think it would go something like this Workbook 1 A B C SUPC LB/CS COST 4773214 LB 4937397 LB Workbook 2 A B C D E F SUPC ITEM # SIZE ITEM_DESCRIPTION CS Price 4773214 2911284 LB 12.45 4937397 2611212 LB 12.51 Can anyone help here. -- Jeff |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In workbook 1 column where cost is type:
=vlookup(a2, Workbook2!$A$2:$F$1000,6,False) This assumes that the price is in column F, change it to 5 if E to 4 if D and so onif needed. -- If this posting was helpful, please click on the Yes button. Regards, Michael Arch. "bhbjk1" wrote: I am using Visual 6.5 I am trying to get my worksheet to find the match of a number in column SUPC on workbook 1, in a SUPC column in workbook 2. When it finds that number, I want to to return the number in Price column of workbook 2 into Cost column on worksheet 1. I think it would go something like this Workbook 1 A B C SUPC LB/CS COST 4773214 LB 4937397 LB Workbook 2 A B C D E F SUPC ITEM # SIZE ITEM_DESCRIPTION CS Price 4773214 2911284 LB 12.45 4937397 2611212 LB 12.51 Can anyone help here. -- Jeff |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Jeff,
Seems like you would only need a VLOOKUP command for what you are looking to do. -- http://HelpExcel.com "bhbjk1" wrote: I am using Visual 6.5 I am trying to get my worksheet to find the match of a number in column SUPC on workbook 1, in a SUPC column in workbook 2. When it finds that number, I want to to return the number in Price column of workbook 2 into Cost column on worksheet 1. I think it would go something like this Workbook 1 A B C SUPC LB/CS COST 4773214 LB 4937397 LB Workbook 2 A B C D E F SUPC ITEM # SIZE ITEM_DESCRIPTION CS Price 4773214 2911284 LB 12.45 4937397 2611212 LB 12.51 Can anyone help here. -- Jeff |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
For what I need workbook 1 for after it is finished, I can not have it linked
to another workbook. This is why I am trying to write a macro in workbook 2 which will fill in the cost column on workbook 1, with the price column in workbook 2 -- Jeff "bhbjk1" wrote: I am using Visual 6.5 I am trying to get my worksheet to find the match of a number in column SUPC on workbook 1, in a SUPC column in workbook 2. When it finds that number, I want to to return the number in Price column of workbook 2 into Cost column on worksheet 1. I think it would go something like this Workbook 1 A B C SUPC LB/CS COST 4773214 LB 4937397 LB Workbook 2 A B C D E F SUPC ITEM # SIZE ITEM_DESCRIPTION CS Price 4773214 2911284 LB 12.45 4937397 2611212 LB 12.51 Can anyone help here. -- Jeff |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
After you have inserted the formula save it as a template, then do copy and
paste values into workbook1. Otherwise what you need is an Addin not just a macro. -- If this posting was helpful, please click on the Yes button. Regards, Michael Arch. "bhbjk1" wrote: For what I need workbook 1 for after it is finished, I can not have it linked to another workbook. This is why I am trying to write a macro in workbook 2 which will fill in the cost column on workbook 1, with the price column in workbook 2 -- Jeff "bhbjk1" wrote: I am using Visual 6.5 I am trying to get my worksheet to find the match of a number in column SUPC on workbook 1, in a SUPC column in workbook 2. When it finds that number, I want to to return the number in Price column of workbook 2 into Cost column on worksheet 1. I think it would go something like this Workbook 1 A B C SUPC LB/CS COST 4773214 LB 4937397 LB Workbook 2 A B C D E F SUPC ITEM # SIZE ITEM_DESCRIPTION CS Price 4773214 2911284 LB 12.45 4937397 2611212 LB 12.51 Can anyone help here. -- Jeff |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Save what as a template?
-- Jeff "Michael" wrote: After you have inserted the formula save it as a template, then do copy and paste values into workbook1. Otherwise what you need is an Addin not just a macro. -- If this posting was helpful, please click on the Yes button. Regards, Michael Arch. "bhbjk1" wrote: For what I need workbook 1 for after it is finished, I can not have it linked to another workbook. This is why I am trying to write a macro in workbook 2 which will fill in the cost column on workbook 1, with the price column in workbook 2 -- Jeff "bhbjk1" wrote: I am using Visual 6.5 I am trying to get my worksheet to find the match of a number in column SUPC on workbook 1, in a SUPC column in workbook 2. When it finds that number, I want to to return the number in Price column of workbook 2 into Cost column on worksheet 1. I think it would go something like this Workbook 1 A B C SUPC LB/CS COST 4773214 LB 4937397 LB Workbook 2 A B C D E F SUPC ITEM # SIZE ITEM_DESCRIPTION CS Price 4773214 2911284 LB 12.45 4937397 2611212 LB 12.51 Can anyone help here. -- Jeff |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am wondering if something like this would work?
-- Jeff "bhbjk1" wrote: I am using Visual 6.5 I am trying to get my worksheet to find the match of a number in column SUPC on workbook 1, in a SUPC column in workbook 2. When it finds that number, I want to to return the number in Price column of workbook 2 into Cost column on worksheet 1. I think it would go something like this Workbook 1 A B C SUPC LB/CS COST 4773214 LB 4937397 LB Workbook 2 A B C D E F SUPC ITEM # SIZE ITEM_DESCRIPTION CS Price 4773214 2911284 LB 12.45 4937397 2611212 LB 12.51 Can anyone help here. -- Jeff |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
Need syntax for RUNning a Word macro with an argument, called from an Excel macro | Excel Programming | |||
translate lotus 1-2-3 macro into excel macro using excel 2000 | Excel Programming |