Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Need some VBA code :)
New Posts  All Forums:Forum Nav:

Need some VBA code :) - Page 2

post #11 of 34
Thread Starter 
I attached the image kinda showing what i want for all the vehicles
Little Smoky
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel E8400 Wolfdale 3.0GHz Gigabyte GA-EP45-UD3P EVGA GTX 260 896MB G.Skill 4GB DDR2 1000 
Hard DriveOptical DriveOSMonitor
Western Digital Caviar 500gb Samsung DVD +/- RW Windows 7 64 Bit 22 Acer LCD 5ms Response 
KeyboardPowerCaseMouse
Logitech Corsair 750WATT Coolermaster Sniper Logitech 
  hide details  
Reply
Little Smoky
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel E8400 Wolfdale 3.0GHz Gigabyte GA-EP45-UD3P EVGA GTX 260 896MB G.Skill 4GB DDR2 1000 
Hard DriveOptical DriveOSMonitor
Western Digital Caviar 500gb Samsung DVD +/- RW Windows 7 64 Bit 22 Acer LCD 5ms Response 
KeyboardPowerCaseMouse
Logitech Corsair 750WATT Coolermaster Sniper Logitech 
  hide details  
Reply
post #12 of 34
Hmmmm... why don't you just combine the master and vehicle list on one workbook? Then use a dropdown box referencing the vehicle list. When you select a different vehicle, the first two columns of the vehicle list gets changed. Would that work?


EDIT: Nevermind you need it stored..... How many vehicles are there? Trying to figure out if it would be faster to do it by hand than code. It should take only 30s to do each vehicle....


Can you upload the two files to OCN?
Edited by DuckieHo - 12/16/08 at 11:57am
Once again...
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 [4.28GHz, HT] Asus P6T + Broadcom NetXtreme II VisionTek HD5850 [900/1200] + Galaxy GT240 2x4GB G.Skill Ripjaw X [1632 MHz] 
Hard DriveOSMonitorKeyboard
Intel X25-M 160GB + 3xRAID0 500GB 7200.12 Window 7 Pro 64 Acer H243H + Samsung 226BW XARMOR-U9BL  
PowerCaseMouseMouse Pad
Antec Truepower New 750W Li Lian PC-V2100 [10x120mm fans] Logitech G9 X-Trac Pro 
  hide details  
Reply
Once again...
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 [4.28GHz, HT] Asus P6T + Broadcom NetXtreme II VisionTek HD5850 [900/1200] + Galaxy GT240 2x4GB G.Skill Ripjaw X [1632 MHz] 
Hard DriveOSMonitorKeyboard
Intel X25-M 160GB + 3xRAID0 500GB 7200.12 Window 7 Pro 64 Acer H243H + Samsung 226BW XARMOR-U9BL  
PowerCaseMouseMouse Pad
Antec Truepower New 750W Li Lian PC-V2100 [10x120mm fans] Logitech G9 X-Trac Pro 
  hide details  
Reply
post #13 of 34
Thread Starter 
Quote:
Originally Posted by DuckieHo View Post
Hmmmm... why don't you just combine the master and vehicle list on one workbook? Then use a dropdown box referencing the vehicle list. When you select a different vehicle, the first two columns of the vehicle list gets changed. Would that work?


EDIT: Nevermind you need it stored..... How many vehicles are there? I believe there is a 255 worksheet limit in Excel 03? Trying to figure out if it would be faster to do it by hand than code. It should take only 30s to do each vehicle....
In total about 750

Edit** But it will be split up by department, so ill have to split it off anyway and run the code a few times selecting different ranges I was thinking.
Little Smoky
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel E8400 Wolfdale 3.0GHz Gigabyte GA-EP45-UD3P EVGA GTX 260 896MB G.Skill 4GB DDR2 1000 
Hard DriveOptical DriveOSMonitor
Western Digital Caviar 500gb Samsung DVD +/- RW Windows 7 64 Bit 22 Acer LCD 5ms Response 
KeyboardPowerCaseMouse
Logitech Corsair 750WATT Coolermaster Sniper Logitech 
  hide details  
Reply
Little Smoky
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel E8400 Wolfdale 3.0GHz Gigabyte GA-EP45-UD3P EVGA GTX 260 896MB G.Skill 4GB DDR2 1000 
Hard DriveOptical DriveOSMonitor
Western Digital Caviar 500gb Samsung DVD +/- RW Windows 7 64 Bit 22 Acer LCD 5ms Response 
KeyboardPowerCaseMouse
Logitech Corsair 750WATT Coolermaster Sniper Logitech 
  hide details  
Reply
post #14 of 34
Quote:
Originally Posted by SilentStryke View Post
In total about 750
A 750 sheet workbook may bring down a a lower end PC....

I checked... Excel doesn't limit worksheets but all are stored in RAM.
Edited by DuckieHo - 12/16/08 at 12:00pm
Once again...
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 [4.28GHz, HT] Asus P6T + Broadcom NetXtreme II VisionTek HD5850 [900/1200] + Galaxy GT240 2x4GB G.Skill Ripjaw X [1632 MHz] 
Hard DriveOSMonitorKeyboard
Intel X25-M 160GB + 3xRAID0 500GB 7200.12 Window 7 Pro 64 Acer H243H + Samsung 226BW XARMOR-U9BL  
PowerCaseMouseMouse Pad
Antec Truepower New 750W Li Lian PC-V2100 [10x120mm fans] Logitech G9 X-Trac Pro 
  hide details  
Reply
Once again...
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 [4.28GHz, HT] Asus P6T + Broadcom NetXtreme II VisionTek HD5850 [900/1200] + Galaxy GT240 2x4GB G.Skill Ripjaw X [1632 MHz] 
Hard DriveOSMonitorKeyboard
Intel X25-M 160GB + 3xRAID0 500GB 7200.12 Window 7 Pro 64 Acer H243H + Samsung 226BW XARMOR-U9BL  
PowerCaseMouseMouse Pad
Antec Truepower New 750W Li Lian PC-V2100 [10x120mm fans] Logitech G9 X-Trac Pro 
  hide details  
Reply
post #15 of 34
Thread Starter 
Quote:
Originally Posted by DuckieHo View Post
A 750 sheet workbook may bring down a a lower end PC....
Thatll give me a good laugh then cause this is work related, not my pc haha.
Read my previous edit, itll be split up.
Little Smoky
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel E8400 Wolfdale 3.0GHz Gigabyte GA-EP45-UD3P EVGA GTX 260 896MB G.Skill 4GB DDR2 1000 
Hard DriveOptical DriveOSMonitor
Western Digital Caviar 500gb Samsung DVD +/- RW Windows 7 64 Bit 22 Acer LCD 5ms Response 
KeyboardPowerCaseMouse
Logitech Corsair 750WATT Coolermaster Sniper Logitech 
  hide details  
Reply
Little Smoky
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel E8400 Wolfdale 3.0GHz Gigabyte GA-EP45-UD3P EVGA GTX 260 896MB G.Skill 4GB DDR2 1000 
Hard DriveOptical DriveOSMonitor
Western Digital Caviar 500gb Samsung DVD +/- RW Windows 7 64 Bit 22 Acer LCD 5ms Response 
KeyboardPowerCaseMouse
Logitech Corsair 750WATT Coolermaster Sniper Logitech 
  hide details  
Reply
post #16 of 34
Quote:
Originally Posted by SilentStryke View Post
Thatll give me a good laugh then cause this is work related, not my pc haha.
Read my previous edit, itll be split up.
Split it up by department now.... In front of each vehicle, add in the dept.
Once again...
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 [4.28GHz, HT] Asus P6T + Broadcom NetXtreme II VisionTek HD5850 [900/1200] + Galaxy GT240 2x4GB G.Skill Ripjaw X [1632 MHz] 
Hard DriveOSMonitorKeyboard
Intel X25-M 160GB + 3xRAID0 500GB 7200.12 Window 7 Pro 64 Acer H243H + Samsung 226BW XARMOR-U9BL  
PowerCaseMouseMouse Pad
Antec Truepower New 750W Li Lian PC-V2100 [10x120mm fans] Logitech G9 X-Trac Pro 
  hide details  
Reply
Once again...
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 [4.28GHz, HT] Asus P6T + Broadcom NetXtreme II VisionTek HD5850 [900/1200] + Galaxy GT240 2x4GB G.Skill Ripjaw X [1632 MHz] 
Hard DriveOSMonitorKeyboard
Intel X25-M 160GB + 3xRAID0 500GB 7200.12 Window 7 Pro 64 Acer H243H + Samsung 226BW XARMOR-U9BL  
PowerCaseMouseMouse Pad
Antec Truepower New 750W Li Lian PC-V2100 [10x120mm fans] Logitech G9 X-Trac Pro 
  hide details  
Reply
post #17 of 34
Thread Starter 
Yea see the "SER" in red on file 2, in that new screen I posted, thats the start of a new vehicle Dept. so just copy that next to each vehicle ID? Cause they dont want that present on the worksheet anywhere. Their picky :/
Little Smoky
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel E8400 Wolfdale 3.0GHz Gigabyte GA-EP45-UD3P EVGA GTX 260 896MB G.Skill 4GB DDR2 1000 
Hard DriveOptical DriveOSMonitor
Western Digital Caviar 500gb Samsung DVD +/- RW Windows 7 64 Bit 22 Acer LCD 5ms Response 
KeyboardPowerCaseMouse
Logitech Corsair 750WATT Coolermaster Sniper Logitech 
  hide details  
Reply
Little Smoky
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel E8400 Wolfdale 3.0GHz Gigabyte GA-EP45-UD3P EVGA GTX 260 896MB G.Skill 4GB DDR2 1000 
Hard DriveOptical DriveOSMonitor
Western Digital Caviar 500gb Samsung DVD +/- RW Windows 7 64 Bit 22 Acer LCD 5ms Response 
KeyboardPowerCaseMouse
Logitech Corsair 750WATT Coolermaster Sniper Logitech 
  hide details  
Reply
post #18 of 34
Thread Starter 
P.S. Sorry if im slow to reply, I am at work, getting hammered today.
Little Smoky
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel E8400 Wolfdale 3.0GHz Gigabyte GA-EP45-UD3P EVGA GTX 260 896MB G.Skill 4GB DDR2 1000 
Hard DriveOptical DriveOSMonitor
Western Digital Caviar 500gb Samsung DVD +/- RW Windows 7 64 Bit 22 Acer LCD 5ms Response 
KeyboardPowerCaseMouse
Logitech Corsair 750WATT Coolermaster Sniper Logitech 
  hide details  
Reply
Little Smoky
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel E8400 Wolfdale 3.0GHz Gigabyte GA-EP45-UD3P EVGA GTX 260 896MB G.Skill 4GB DDR2 1000 
Hard DriveOptical DriveOSMonitor
Western Digital Caviar 500gb Samsung DVD +/- RW Windows 7 64 Bit 22 Acer LCD 5ms Response 
KeyboardPowerCaseMouse
Logitech Corsair 750WATT Coolermaster Sniper Logitech 
  hide details  
Reply
post #19 of 34
Place both sheets in the same workbook. Name one "Master Template" and the other must be "Vehicle List". Then try running the code below.

I recommend you reduce the vehicle list to 10 just for testing. Tweak code as need.

Code:
Sub Copier()
Dim vehID As String
Dim vehNm As String
Dim numVeh As Integer
Dim i As Integer

' Get the number of vehicles to create tabs 
    Sheets("Vehicle List").Select
    Range("C65536").Select
    numVeh = Selection.End(xlUp).Row - 3

' Loop for each vehicle
For i = 3 To numVeh
    ' Get vehicle ID and Name
    Sheets("Vehicle List").Select
    vehID = Cells(i, 3)
    vehNm = Cells(i, 4)
    
    ' Copy and rename template to vehID
    Sheets("Master Template").Copy Before:=Sheets(1)
    Sheets("Master Template (2)").Select
    Sheets("Master Template (2)").Name = vehID

    ' Insert vehicle ID/name and then copy down
    Cells(i, 2) = vehID
    Cells(i, 3) = vehNm
    Range(Cells(i, 2), Cells(i, 3)).Select
    Selection.Copy
    Range(Selection, Selection.End(xlDown)).Select
    ActiveSheet.Paste
    Application.CutCopyMode = False
    i = i + 1
Loop
    
End Sub
Once again...
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 [4.28GHz, HT] Asus P6T + Broadcom NetXtreme II VisionTek HD5850 [900/1200] + Galaxy GT240 2x4GB G.Skill Ripjaw X [1632 MHz] 
Hard DriveOSMonitorKeyboard
Intel X25-M 160GB + 3xRAID0 500GB 7200.12 Window 7 Pro 64 Acer H243H + Samsung 226BW XARMOR-U9BL  
PowerCaseMouseMouse Pad
Antec Truepower New 750W Li Lian PC-V2100 [10x120mm fans] Logitech G9 X-Trac Pro 
  hide details  
Reply
Once again...
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 [4.28GHz, HT] Asus P6T + Broadcom NetXtreme II VisionTek HD5850 [900/1200] + Galaxy GT240 2x4GB G.Skill Ripjaw X [1632 MHz] 
Hard DriveOSMonitorKeyboard
Intel X25-M 160GB + 3xRAID0 500GB 7200.12 Window 7 Pro 64 Acer H243H + Samsung 226BW XARMOR-U9BL  
PowerCaseMouseMouse Pad
Antec Truepower New 750W Li Lian PC-V2100 [10x120mm fans] Logitech G9 X-Trac Pro 
  hide details  
Reply
post #20 of 34
Thread Starter 
Quote:
Originally Posted by DuckieHo View Post
Place both sheets in the same workbook. Name one "Master Template" and the other must be "Vehicle List". Then try running the code below.

I recommend you reduce the vehicle list to 10 just for testing. Tweak code as need.

Code:
removed
That was quick!
Thanks so much sir.
I will give this a try first thing in the morning, many thanks!
Little Smoky
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel E8400 Wolfdale 3.0GHz Gigabyte GA-EP45-UD3P EVGA GTX 260 896MB G.Skill 4GB DDR2 1000 
Hard DriveOptical DriveOSMonitor
Western Digital Caviar 500gb Samsung DVD +/- RW Windows 7 64 Bit 22 Acer LCD 5ms Response 
KeyboardPowerCaseMouse
Logitech Corsair 750WATT Coolermaster Sniper Logitech 
  hide details  
Reply
Little Smoky
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel E8400 Wolfdale 3.0GHz Gigabyte GA-EP45-UD3P EVGA GTX 260 896MB G.Skill 4GB DDR2 1000 
Hard DriveOptical DriveOSMonitor
Western Digital Caviar 500gb Samsung DVD +/- RW Windows 7 64 Bit 22 Acer LCD 5ms Response 
KeyboardPowerCaseMouse
Logitech Corsair 750WATT Coolermaster Sniper Logitech 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Need some VBA code :)