Code to find values and copy to another sheet

redjay

New Member
Joined
May 9, 2008
Messages
46
HI all<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p></o:p>
I would like a little macro help if possible. Or to be pointed in the direction of the Excel function which would do what I require.<o:p></o:p>
<o:p></o:p>
I have a very simple worksheet (‘Sales’) in which every time a sale is made, a new row gets added in the following format <o:p></o:p>
<o:p></o:p>
Column A - Column B<o:p></o:p>
Customer Name - Sales ID<o:p></o:p>
<o:p></o:p>
Now, in another worksheet (‘Customer’) I have a list of all the Customer Names and the price each customer pays.<o:p></o:p>
<o:p></o:p>
Column A - column B<o:p></o:p>
Customer Name - Price<o:p></o:p>
<o:p></o:p>
I would like some code which cycles through the ‘Sales’ sheet, looks at the customer name in column A and retrieves the correct price for that customer from the ‘Customer’ sheet. I would then like that value to be pasted into column C. End result being that the correct price for each customer is next to each sale in the ‘Sales’ sheet.<o:p></o:p>
<o:p></o:p>
Hope that makes sense! Many thanks for any suggestions.<o:p></o:p>
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Forum statistics

Threads
1,224,548
Messages
6,179,448
Members
452,915
Latest member
hannnahheileen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top