Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Cam Cam is offline
external usenet poster
 
Posts: 165
Default VBA code for macro help

Hello,

I have two different data in two worksheets, worksheet 1 is the main data
that I would like to create a macro for. Sheet2 contains raw data that I pull
daily or weekly.

What I would like to achieve for the VBA macro is to dump the raw data in
sheet2 into sheet1, but put into the right cell. The macro needs to be able
to:
1) Fill in the s/o number to column D:G based on the latest operation number
for each model & part# type column.
2) Each model in the row will always have 2 (1300) & 2 (1500)
3) The row with "vendor" fill in do not require s/o fill in.
4) Column H:K, I can do a Vlookup to fill in the operation number from the
raw data.

Example: for row with No. 1002 & 1003 that have the same model, 218029
(1300) @ operation 100 is a later operation than 215789 (1300) @ operation
90, so the first s/o to fill in row with 1002 is 218031 and so on.

Here is the data sample:

Sheet1
No. ShipDate Model 1300 1300 1500 1500 Operation
Status
1001 17-Aug 100 vendor vendor vendor vendor #N/A #N/A #N/A #N/A
1002 18-Aug 200 218029 218031 215226 214526 100 95 320 197
1003 19-Aug 200 215789 218033 216999 216998 90 90 320
162
1004 19-Aug 100 215048 215780 215778 217693 90 90 410
180
1005 20-Aug 100 vendor vendor vendor vendor #N/A #N/A #N/A #N/A
1006 21-Aug 200 218035 216994 217000 218041 90 80 162
165
1007 25-Aug 100 216966 218975 218042 217001 80 70 300
150
1008 25-Aug 100 215765 215769 215779 215785 50 60 250
100

Sheet2
Raw Data
S/O Operation Ref Model
218029 100 1300 200
215789 90 1300 200
215048 90 1300 100
218035 90 1300 200
216966 80 1300 100
215765 50 1300 100
218974 20 1300 200
218031 95 1300 200
218033 90 1300 200
215780 90 1300 100
216994 80 1300 200
218975 180 1300 100
215769 320 1300 100
219680 150 1300 200
215226 320 1500 200
216999 320 1500 200
215778 410 1500 100
217000 162 1500 200
218042 150 1500 100
215779 250 1500 100
215790 110 1500 200
214526 197 1500 200
216998 162 1500 200
217693 180 1500 100
218041 165 1500 200
217001 150 1500 100
215785 10 1500 100
218039 110 1500 200

Thanks
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
Deleting code from a macro (by a macro) Brettjg Excel Discussion (Misc queries) 2 May 8th 07 10:14 PM
Macro code Shu of AZ Excel Discussion (Misc queries) 2 January 29th 07 06:29 PM
Help With Macro Code?? Neil Smith Excel Worksheet Functions 1 August 24th 06 07:40 PM
Macro VB code help Anthony Excel Discussion (Misc queries) 4 October 8th 05 07:25 PM
Zip Code Macro Ken Wright Excel Worksheet Functions 0 December 9th 04 07:55 AM


All times are GMT +1. The time now is 11:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"