+ Reply to Thread
Results 1 to 6 of 6

Macro to Add sheet after last sheet

  1. #1
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,725

    Macro to Add sheet after last sheet

    I have tried to write code to create a sheet to have the same name as in cell A1 on sheet1 ("Data") and to copy all the values and formats


    For eg if A1 on sheet1 (named "Data") A1 is July-2019 , then sheet "July-2019" is to be created after the last sheet and the data copied and pasted as values and the format also to be the same


    I get a run time error when running the macro

    Please Login or Register  to view this content.

    I have attached sample Data

    It would be appreciated if someone could assist me

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Macro to Add sheet after last sheet

    If you're copy all data and formats from Sheet1 to the newly created sheet, why not just copy it then stamp values over the formulas?

    Try this:
    Please Login or Register  to view this content.
    Does that work for you?

    BSB

  3. #3
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,725

    Re: Macro to Add sheet after last sheet

    Thanks for appreciated the help, much appreciated

    I would like to know how to save the sheet once copied to desktop using VBA

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Macro to Add sheet after last sheet

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,725

    Re: Macro to Add sheet after last sheet

    Thanks Jindon Works perfectly

  6. #6
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,725

    Re: Macro to Add sheet after last sheet


+ 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. [SOLVED] Macro updating after selecting another sheet and back to Macro enabled sheet?
    By Imran Magsi in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-29-2016, 04:38 AM
  2. macro to get sum of sheet 1 subtract with sum of sheet 2 and input value of sheet 3
    By danwoltrs in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-15-2015, 04:41 PM
  3. [SOLVED] Macro to copy data from a master sheet to separate sheet as per date using a macro
    By tmaster81 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-23-2014, 08:05 AM
  4. [SOLVED] Macro to Copy Data from one Sheet A to Sheet B based on value in cell on sheet A
    By scass in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-11-2012, 07:21 PM
  5. Replies: 1
    Last Post: 07-30-2012, 02:35 PM
  6. [SOLVED] When sheet is activated, execute macro in other sheet and return to sheet
    By timtim89 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-16-2012, 10:50 AM
  7. Macro: Count rows in sheet A, copy count in sheet B, paste offset in sheet A
    By Agent:Orange in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-19-2011, 07:56 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