Hi all,
Looking for some help on this. My colleague and I have developed a pricing tool that we use for costing component parts. Often these component parts are very similar in terms of manufacture with the only difference being that the size of the component alters. We've set the spreadsheet up so that all we need to do is enter the line number and this alters the size of the component automatically and gives a price, which we then copy back to the corresponding line in our data schedule. The only problem with this is that often we're doing this for 100's of lines which can become quite monotonous.
This code for one line is basically what we'd like the routine to do for all lines:
What we'd like to be able to do if possible, is to run a loop that would perform the above for every line until it finds a blank cell in column A in "imported lines". So A2 becomes A3 and the number in this cell gets copied to "routes" B8. Then the result in "BoM Report" AA80 is copied and pasted to G3 in "imported lines" and so forth.
Apologies if this is unclear, I've written it a few times to try to make it as concise as possible without making it nonsensical! let me know if you need any more info, happy to supply as much info as is needed
Thank you very much in advance
Tony
Looking for some help on this. My colleague and I have developed a pricing tool that we use for costing component parts. Often these component parts are very similar in terms of manufacture with the only difference being that the size of the component alters. We've set the spreadsheet up so that all we need to do is enter the line number and this alters the size of the component automatically and gives a price, which we then copy back to the corresponding line in our data schedule. The only problem with this is that often we're doing this for 100's of lines which can become quite monotonous.
This code for one line is basically what we'd like the routine to do for all lines:
Code:
Sub AUTOCOPYPASTE()'
' AUTOCOPYPASTE Macro
'
'
Sheets("Imported Lines").Select
Range("A2").Select
Selection.Copy
Sheets("Routes").Select
Range("B8").Select
ActiveSheet.Paste
Sheets("BoM Report").Select
Range("AA80").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Imported Lines").Select
Range("G2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
What we'd like to be able to do if possible, is to run a loop that would perform the above for every line until it finds a blank cell in column A in "imported lines". So A2 becomes A3 and the number in this cell gets copied to "routes" B8. Then the result in "BoM Report" AA80 is copied and pasted to G3 in "imported lines" and so forth.
Apologies if this is unclear, I've written it a few times to try to make it as concise as possible without making it nonsensical! let me know if you need any more info, happy to supply as much info as is needed
Thank you very much in advance
Tony