daniels012
Well-known Member
- Joined
- Jan 13, 2005
- Messages
- 5,219
I copy and paste data from Estimating(sheet) to WhatToOrder(sheet).
I set up a button to do this action as I wish. I have 7 buttons. Do I need to re-write the code 6 more times or can I execute the code based upon where I am on the sheet?
Works great! I know I can copy and paste each sets of code, change all the numbers but it would be a lot easier to have it copy from Estimating and paste on current cell, then down 1 place, then down 1 more cell, etc. etc.
I set up a button to do this action as I wish. I have 7 buttons. Do I need to re-write the code 6 more times or can I execute the code based upon where I am on the sheet?
Code:
Sub JobData1()
'
' JobData1 Macro
' Enter Data from Estimating to the job one column
'
'
Application.ScreenUpdating = False
Range("E2").Select
Sheets("ESTIMATING").Select
Range("B3").Select
Selection.Copy
Sheets("What to Order").Select
Range("E2").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Sheets("ESTIMATING").Select
Range("B8").Select
Selection.Copy
Sheets("What to Order").Select
Range("E3").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Sheets("ESTIMATING").Select
Range("H3:H27").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("What to Order").Select
Range("E4").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Selection.NumberFormat = "0.00"
Range("E2").Select
Application.ScreenUpdating = True
End Sub
Works great! I know I can copy and paste each sets of code, change all the numbers but it would be a lot easier to have it copy from Estimating and paste on current cell, then down 1 place, then down 1 more cell, etc. etc.