Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Excel Macro Help

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 791
Default Excel Macro Help

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Excel Macro Help

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 791
Default Excel Macro Help

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Excel Macro Help

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Excel Macro Help

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
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
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
My excel macro recorder no longer shows up when recording macro jack Excel Discussion (Misc queries) 3 February 5th 07 08:22 PM
Need syntax for RUNning a Word macro with an argument, called from an Excel macro Steve[_84_] Excel Programming 3 July 6th 06 07:42 PM
translate lotus 1-2-3 macro into excel macro using excel 2000 krutledge0209 Excel Programming 1 November 2nd 04 05:50 PM


All times are GMT +1. The time now is 12:16 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"