LINE OR LINES INSERTION AND COPY
LINE OR LINES INSERTION AND COPY
(OP)
sorry to be asking so many questions. but have been perusing through to find something that can help, but can't find it or i don't know what I am looking at.
Anyway, my question is.
if I have typed a 1,2,3... and so on, in column A on sheet 2, rows 2, 9, 13( now each can be different each time e.g. 4,5,21,35)
Can a macro be created that will look at sheet 2 and copy (say) Cell D5 on sheet 2 (since Column A has been marked),then go to sheet 1 insert row(s) under a certain heading ( this is my main form )where it needs to be placed and place what was in D5( sheet 2) into cell (say) B4 on sheet 1 ( or what ever row it needs to be)?
Anyway, my question is.
if I have typed a 1,2,3... and so on, in column A on sheet 2, rows 2, 9, 13( now each can be different each time e.g. 4,5,21,35)
Can a macro be created that will look at sheet 2 and copy (say) Cell D5 on sheet 2 (since Column A has been marked),then go to sheet 1 insert row(s) under a certain heading ( this is my main form )where it needs to be placed and place what was in D5( sheet 2) into cell (say) B4 on sheet 1 ( or what ever row it needs to be)?





RE: LINE OR LINES INSERTION AND COPY
Sheet 1
Column B
Row 1 5410-6020(0)M-4719-F
Row 2 5410-6020(2)H-5030-R
Row 3 5003-5410-6015
Row 4 7503-310p-6620
Sheet 2
Column A Column D
Row 4 1 123594
Row 9 2 556978
Row 21 1 24891006
Sheet 3
Column A Column D
Row 11 1 123594
Row 12 2 556978
Row 16 1 24891006
So From Sheet 3 Row 12 Column D put in Sheet 1 under Row 1
From Sheet 2 Row 9 Column D put in Sheet 1 under Row 1
From Sheet 2 Row 21 Column D put in Sheet 1 under Row 3
From Sheet 2 Row 4 Column D put in Sheet 1 under Row 2
and so on.
RE: LINE OR LINES INSERTION AND COPY
RE: LINE OR LINES INSERTION AND COPY
At the bottom you see Sheet 3 Row 12 Column D, So what I am trying to explain ( terribly at that ) is that when I Click a "command button" (failed to mention that)that it looks through all worksheets.... notes a numerical number in column A in all worksheets... then goes across the rows to column D grabs that cell and copies it to worksheet 1 under column B, but needs to insert a row prior to pasting. And also need to be put under the proper heading.... Again sorry, if I could paste an exact picture, I think it would be of more help explaining what I am trying to do.
RE: LINE OR LINES INSERTION AND COPY
See FAQ559-1100: How Can I Show An Image In A Post and FAQ559-1177: How Do I Make Files Available For Download? ... No Emails Required
RE: LINE OR LINES INSERTION AND COPY
Are you saying that it can only be done, if the headings were attached in each worksheet? Which means i would have to manually enter this each time... if this is true, then I suppose i need to check other options.. or just forget this whole idea of automation....
e.g.
Sheet 2
Column A Column D
Row 4 1 123594 5410-6020(0)M-4719-F
Row 9 2 556978 5410-6020(2)H-5030-R Row 21 1 24891006 7503-310p-6620
RE: LINE OR LINES INSERTION AND COPY
Start here http
and come back with your more specific and focussed questions when you have a good grasp of the basics.
Good Luck
johnwm
________________________________________________________
To get the best from these forums read FAQ731-376: Eng-Tips.com Forum Policies before posting
Steam Engine enthusiasts
Steam Engine Prints
RE: LINE OR LINES INSERTION AND COPY
TTFN
FAQ731-376: Eng-Tips.com Forum Policies