How to automatically update/copy data between the sheets

riverain

New Member
Joined
Jan 10, 2024
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hello,

I'm facing some challenges with my daily tasks and would greatly appreciate assistance.

Let me explain the situation. I have two spreadsheets within one Excel file. In Sheet 1, column A contains the existing customer codes, while columns B and C hold models and prices, respectively. On Sheet 2, I have a list of new customer codes. I'm wondering how to utilise VBA code to generate a new spreadsheet that catalogues these new customer codes along with the corresponding models and prices retrieved from Sheet 1, assigned to the existing customer codes.

Any guidance or support regarding this matter would be immensely helpful.
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
to understanI'm wondering how to utilise VBA code to generate a new spreadsheet that catalogues these new customer codes along with the corresponding models and prices retrieved from Sheet 1, assigned to the existing customer codes.
Welcome to the forum

With Excel 365 in your hand, I think what you want to achieve can be done without VBA too.
Though you have explained well, still would recommend you to share XL2BB of both sheets to understand the data structure of both sheets and deliver you a suitable solution.
 
Upvote 0
Here is the master sheet.

20240104 SA pathology.xlsx
ABCDEF
1CustomerMaterialAmountUnitValid fromValid to
2137172114021607100537.16AUD01.01.202431.12.2024
3137172114046430011263.97AUD01.01.202431.12.2024
4137172114047533643413.18AUD01.01.202431.12.2024
5137172114047533750116.97AUD01.01.202431.12.2024
6137172114047740044146.68AUD01.01.202431.12.2024
7137172114047740045165.74AUD01.01.202431.12.2024
8137172114050237999927.67AUD01.01.202431.12.2024
913717213960100683.56AUD01.01.202431.12.2024
10137172145.0001148549AUD01.01.202431.12.2024
11137172145.0001148549AUD01.01.202431.12.2024
121371721CD10-270-L-CE2518.77AUD01.01.202431.12.2024
131371721CD163-L-CE1898.63AUD01.01.202431.12.2024
141371721CD8-4B11-L-CE1975.64AUD01.01.202431.12.2024
151371721DES-DERII-L-CE871.58AUD01.01.202431.12.2024
161371721D-SARC-CE1308.36AUD01.01.202431.12.2024
171371721DYS3-CE1495AUD01.01.202431.12.2024
181371721END-L-CE929.04AUD01.01.202431.12.2024
191371721LL002-L-CE904.67AUD01.01.202431.12.2024
201371721MHCN1188.69AUD01.01.202431.12.2024
211371721MT1-L1000.05AUD01.01.202431.12.2024
221371721NAPSINA-L-CE1391.54AUD01.01.202431.12.2024
231371721S26.0432681.65AUD01.01.202431.12.2024
241371721S26.0671.110.A448.37AUD01.01.202431.12.2024
251371721S26.1400706.84AUD01.01.202431.12.2024
261371721S45.4503.B5061.26AUD01.01.202431.12.2024
271371721S45.4504.B5061.26AUD01.01.202431.12.2024
281371721S45.4504.B5061.26AUD01.01.202431.12.2024
291371721S45.4507.A2152.78AUD01.01.202431.12.2024
301371721VWF-L-CE630.3AUD01.01.202431.12.2024
master


this is the list where I store all new customer codes.

20240104 SA pathology.xlsx
A
1Customer
21400100
31400101
41400102
51400103
61400104
71400105
81400106
91400107
101400108
111400109
121400110
131400111
141400112
151400113
161400114
171400115
181400116
191400117
List


I need to create a VBA code that automatically copies all data assigned to existing customer codes to the new customer codes in the sheet list. Thanks so much for any help.
 
Upvote 0
I need to create a VBA code that automatically copies all data assigned
I'm no VBA expert. Trying to figure ways to do same without VBA - Just in case that suits you?

Further, the sample data you shared - In Master there is only one customer code running. Also how to correlate between Master Customer and New Customer code is not clear. Please clarify that too.
 
Upvote 0
I'm no VBA expert. Trying to figure ways to do same without VBA - Just in case that suits you?

Further, the sample data you shared - In Master there is only one customer code running. Also how to correlate between Master Customer and New Customer code is not clear. Please clarify that too.
i can manually do it. copy the new customer code to the existing customer code and then copy the data in column B to F but i was thinking if there is a quick way to do that with VBA coding.
 
Upvote 0

Forum statistics

Threads
1,215,095
Messages
6,123,073
Members
449,093
Latest member
ripvw

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