+ Reply to Thread
Results 1 to 12 of 12

Help required in creating macros for 3 things

  1. #1
    Registered User
    Join Date
    03-24-2015
    Location
    Melbourne
    MS-Off Ver
    2013
    Posts
    6

    Help required in creating macros for 3 things

    hi there,

    I think I'm in the right place to get some help with my excel problems I'm having?

    I have a spreadsheet that will be built on throughout the year. When a new job comes into our team I would like the guys to be able to insert a new job with a template, plus there were some additional things that I have no idea whether they're possible or not so would love to see what you guys think.

    Specifically, I would like to create a new sheet, after sheet 3 using the "template" and renaming it with the next number in the sequence (job numbers) and having it also create a link (with the sheet name) to the sheet within the index job number column.

    Secondly, I would like to know if there is a way to populate the index based on cell information from the new jobs when entered?

    Lastly, is finding out the correct and easiest way to automatically calculate totals from each sheet (same cell location in each sheet) that also take into account with new sheets are created.

    Sounds extremely basic and I'm sure it is - I really haven't done much of this type of thing before but am planning on getting some training down the track. In the meantime, I have searched this site and others to try and get a fix but can't work it out so i look forward to see if you can help me.

    I have attached an example spreadsheet outlining what I'm trying to achieve.

    I realllllly look forward to your assistance and apologies if it's super basic. Example Spreadsheet.xlsm
    Last edited by tahnimaree; 03-25-2015 at 10:43 PM. Reason: Solved

  2. #2
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    365 Version 2409
    Posts
    2,789

    Re: Help required in creating macros for 3 things

    I moved your instructions to cell N11 because I need the area under the first few columns blank. I had to delete your sheet 201503 to run the code and that screwed up the table to the right that you speak of. So just push the create job button and you'll see it creates the sheet 201503 and creates the hyperlink on the dashboard. Just let me know what else you need. As well as telling me what else you need, It might be a good idea to type or create stuff manually and highlight it so I see what it's supposed to be. After you create the new 201503 sheet you could do this with the table at the right so I know what you want.

    Good Luck!!!
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    03-24-2015
    Location
    Melbourne
    MS-Off Ver
    2013
    Posts
    6

    Re: Help required in creating macros for 3 things

    Thanks so much skywriter that worked fantastically.

    Just wondering as an extension on this, if I were to hide the 'template' sheet but still want the macro to run as you have set it up as - with the new sheet being visible as normal, how would I go about that?
    Last edited by tahnimaree; 03-25-2015 at 02:05 AM.

  4. #4
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    365 Version 2409
    Posts
    2,789

    Re: Help required in creating macros for 3 things

    Quote Originally Posted by tahnimaree View Post
    Thanks so much skywriter that worked fantastically.

    Just wondering as an extension on this, if I were to hide the 'template' sheet but still want the macro to run as you have set it up as - with the new sheet being visible as normal, how would I go about that?
    Try this version if you want to hide the template.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    03-24-2015
    Location
    Melbourne
    MS-Off Ver
    2013
    Posts
    6

    Re: Help required in creating macros for 3 things

    For some reason when I put the code into my actual workbook I am using this for and go to run the macro I get two errors, which if I click yes to both it seemingly continues to create the new worksheet like it's supposed to. Any ideas on what's going on or how to fix it?
    Error1.PNGError2.PNG

  6. #6
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    365 Version 2409
    Posts
    2,789

    Re: Help required in creating macros for 3 things

    Well I would guess it has something to do with you giving me one sheet to write code against and then using the code on another sheet. In your picture I don't see college anywhere and I don't see regional anywhere. So I don't even know where that is coming from.
    Last edited by skywriter; 03-25-2015 at 03:43 AM.

  7. #7
    Registered User
    Join Date
    03-24-2015
    Location
    Melbourne
    MS-Off Ver
    2013
    Posts
    6

    Re: Help required in creating macros for 3 things

    Sorry - I'm working with some confidential financial information so was replicating for the internet without that data - didn't mean to offend.

    College is in A31 and Regional is listed twice in A32 and A33.

  8. #8
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    365 Version 2409
    Posts
    2,789

    Re: Help required in creating macros for 3 things

    You should make a copy of the actual workbook and then delete out the confidential information and then post it.
    Don't change any sheet names or move anything or delete any sheets, leave it as is, just remove the data. I'm sure I can easily adjust the code. It probably has to do with a difference in sheets, or columns.

    College is in A31 and Regional is listed twice in A32 and A33.
    Duh, sorry it's almost 1:00 A.M. here, I'm about ready for bed. My mind was telling me this had something to do with the code trying to name a sheet something other than what my original code wanted it to. Anyway I see those now.

    I think that has something to do with named ranges. I see in your sheet that I have that these are named ranges, but there's a #REF error. Go into formulas tab, then name manager and tell me in the refers to column what it says these two names refer to in your sheet.
    Last edited by skywriter; 03-25-2015 at 04:02 AM.

  9. #9
    Registered User
    Join Date
    03-24-2015
    Location
    Melbourne
    MS-Off Ver
    2013
    Posts
    6

    Re: Help required in creating macros for 3 things

    I think you need to tell me where I can send a carton of beer as you as the best (and patient....). Hopefully this works. Thanks again.
    Attached Files Attached Files

  10. #10
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    365 Version 2409
    Posts
    2,789

    Re: Help required in creating macros for 3 things

    Yeah it has to do with some named ranges you have. I don't know the history of these, so if you want to explain it to me I can help. But if you go to formulas, name manger you will see quite a few and they all have ref errors. If you don't need these you could just delete them and that might stop the errors.

    If you just try to make a copy of the template sheet, which is exactly what the code does, then you will see that this same error comes up. Is has to do with those names being a part of or referenced on the template I don't know which and when you try to make a copy you get the name issue.
    Last edited by skywriter; 03-25-2015 at 04:27 AM.

  11. #11
    Registered User
    Join Date
    03-24-2015
    Location
    Melbourne
    MS-Off Ver
    2013
    Posts
    6

    Re: Help required in creating macros for 3 things

    Thanks Skywriter for staying up late and helping me sort out my sheet (pun inteded).... All sorted.

    Cheers
    Tahni

  12. #12
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    365 Version 2409
    Posts
    2,789

    Re: Help required in creating macros for 3 things

    No sheet, it's sorted out? Okay, thanks for the feedback.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 12-16-2014, 10:59 PM
  2. [SOLVED] Creating a search method in an excel sheet to identify things according to a specific id.
    By Moh13 in forum Excel Programming / VBA / Macros
    Replies: 28
    Last Post: 10-02-2013, 11:40 PM
  3. Combine 2 Macros Help Required
    By m_789 in forum Excel General
    Replies: 1
    Last Post: 06-20-2012, 11:07 AM
  4. Things I have learned about Excel macros
    By Andrew-R in forum The Water Cooler
    Replies: 4
    Last Post: 08-19-2010, 02:40 PM
  5. Things that interfere with VBA Macros
    By Phil_V in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-09-2009, 05:32 AM

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