×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

LINE OR LINES INSERTION AND COPY

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)?  


RE: LINE OR LINES INSERTION AND COPY

(OP)
Maybe this might help

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

You can certainly make a macro to copy values, insert rows, and paste values.  However, I see no correlation between the data in your "sheets" and where you are saying that you want to put it.  How the heck is the macro supposed to know that "556978" goes "under Row 1"?  Is this another instance in which you have some secret goal that you've not told us yet?

RE: LINE OR LINES INSERTION AND COPY

(OP)
I know, i know, my explenations are terrible.. and very sorry..

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

(OP)
So sorry to be a PITA....  

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

There seems to be a bit of a gap here! You may find it helpful to start with one or two Excel tutorials, as they will give you an overview of what is, and isn't, possible (and available) in Excel.

Start here http://www.google.co.uk/search?client=firefox-a&rls=org.mozilla%3Aen-GB%3Aofficial&channel=s&;hl=en&;q=excel+tutorial&meta=&btnG=Google+Search

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

You need to explain what criteria this macro is supposed to use to determine what data to copy and where it's supposed to put it.  You've given examples of the data, but not the criteria.  Give more details and don't assume anything about the approach to a solution.

TTFN

FAQ731-376: Eng-Tips.com Forum Policies

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources