+ Reply to Thread
Results 1 to 7 of 7

Copying rows on excel automatically to other tabs

  1. #1
    Registered User
    Join Date
    12-05-2012
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2003
    Posts
    27

    Thumbs up Copying rows on excel automatically to other tabs

    Hi there apologies if this is simple stuff but im still a novice...

    I have an excel spreadsheet, with 8 tabs,, Long Term is the main tab where i 'enter information'

    the other tabs 1,2,3,4,5,Dead and Filled are Locked tabs.

    I enter my information in each row on the Long Term tab. i need the spreadsheet to automatically move the rows to the relevant tab. I have set up a validation with a drop down for 1-2-3-4-5-Dead and Filled in one coloumn. is this possible and if so please tell me how.

    so if a line is - John Smith , 25/11/2012, 28/5/13, then Dead.. It would need to go to the 'Dead TAB'...

    and if it was Guinness, 29/11/2012, 21/12/12 then 2 ... it would need to go to the '2 Tab'

    HOWEVER the lines would still need to stay in the Long Term Tab to be edited


    Thanks in advance

    Dean
    Last edited by dean.grimshaw; 12-05-2012 at 06:53 AM. Reason: Issue solved

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Copying rows on excel automatically to other tabs

    This can be accomplished. I have a few questions -

    1. By locked, do you mean they are password protected too? If yes, you will need to provide the password in the code (you can add it in later) so that the code unprotects the sheet, copies the data and protects it again.

    2. Which is the column that will contain the dropdown showing which tab the data needs to go to?

    3. Once you have run the macro and copied the data to the relevant tabs, if you make any changes to the Long Term tab, and want to run the macro again, the data will be duplicated in the destination tabs. Hence, will it be fine if the macro clears all the data from the destination tabs and then loads fresh data from the top to the last row of the Long Term Tab?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    12-05-2012
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: Copying rows on excel automatically to other tabs

    Hi There in anser to your question, By locked i do mean password protected, and in regards to the colomn that is named 'Grade'...
    and yes thats fine if it deletes and re runs the macro to cpy the data again.

    Just a further question would it be possible to also make it so when in the 'Grade' colomn you select Dead they become Red and filled they become green?

    That would be great,.

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Copying rows on excel automatically to other tabs

    What is the column address (A or B or C) for Grade?

    You can do the color changing through conditional formatting. You do not need to include it in the macro.

  5. #5
    Registered User
    Join Date
    12-05-2012
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: Copying rows on excel automatically to other tabs

    I can do the conditional formatting thanks...

    Grade is in Column H.

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Copying rows on excel automatically to other tabs

    Try this code -

    Please Login or Register  to view this content.
    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
    Choose Insert | Module
    Where the cursor is flashing, choose Edit | Paste

    To run the Excel VBA code:
    Choose Tools | Macro | Macros
    Select a macro in the list, and click the Run button

  7. #7
    Registered User
    Join Date
    12-05-2012
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: Copying rows on excel automatically to other tabs

    great stuff thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1