Excel User Group
Microsoft Excel blogs, forums, files. Read, ask questions, provide answers.

Excel macro help

Latest post Wed, Nov 19 2008 4:02 AM by Nick Hodge. 3 replies.
  • Mon, Nov 17 2008 6:40 PM

    • Jimbosquid
    • Top 200 Contributor
    • Joined on Mon, Nov 17 2008
    • Posts 2
    • Points 42

    Excel macro help

    Hello, I need some help with an excel macro

    We are creating a "list" using excel. I need to create a macro to do the following:

    1. Add a new sheet, copy from an original or master( ideally by pressing a button or key combination). The sheet will be named numerically in sequence.

    2. Create cell references on a "Project" page refering to the new sheet created.

    example. Create sheet "51" ( or the next number in the sequence),

    Copy the information in cell '51'!$B$1 to the next available cell in Column B on the "project" sheet.

    Copy the information in cell '51'!$B$3 to the next available cell in column C on the "project" sheet.

    and so forth until you get to column G

    Thank you for your help

    • Post Points: 21
  • Tue, Nov 18 2008 3:37 AM In reply to

    • Nick Hodge
    • Top 10 Contributor
    • Joined on Sun, Dec 23 2007
    • Southampton
    • Posts 336
    • Points 5,771
    • MVP

    You mention you need help. Have you made a start at all or are you looking for us to build from scratch?

    Regards
    Nick Hodge
    Microsoft MVP, Excel
    Southampton, UK

    • Post Points: 21
  • Tue, Nov 18 2008 11:43 AM In reply to

    • Jimbosquid
    • Top 200 Contributor
    • Joined on Mon, Nov 17 2008
    • Posts 2
    • Points 42

    I have tried several times and done alot of reading.  I cant figure out a real starting point.  I think that I can revised and edit, but I cant figure out the starting point.

    • Post Points: 21
  • Wed, Nov 19 2008 4:02 AM In reply to

    • Nick Hodge
    • Top 10 Contributor
    • Joined on Sun, Dec 23 2007
    • Southampton
    • Posts 336
    • Points 5,771
    • MVP

    I fear this is a 'project' and not really help. (You may have to pay someone for this)

    We may be able to take it in bite-sized chunks, but it looks like you have no idea how you will complete it if we gave you a start.

    If this is not the case, I apologise and here is a start

    To copy a worksheet from one book to a new book is easy. In the 'Master' workbook put this code

    Sub MoveSheet()
    ActiveSheet.Copy
    End Sub

    You can then add a button to your workbook from the 'Forms Toolbar' and assign this macro to it, by right-clicking and selecting 'assign macro'. Clicking the button will then run the code, copying the active sheet to a new workbook

    Regards
    Nick Hodge
    Microsoft MVP, Excel
    Southampton, UK

    Filed under: ,
    • Post Points: 5
Page 1 of 1 (4 items) | RSS
Copyright Excel User Group and the relevant contributors, 2008. All Trade Marks acknowledged. This site is a peer-to-peer site and NOT affiliated in any way to Microsoft Corp. All rights reserved.