+ Reply to Thread
Results 1 to 3 of 3

Macro problem

  1. #1
    Bonbon
    Guest

    Macro problem

    Is there a macro to name the sheet the name of a cell, with a slight change?
    e.g. the cell is : M-13.06.2005, and i want the sheet to be named M-13.06.05.
    However i would like to name 5 days of the week, everytime the macro is run,
    i.e. it names monday-friday each time.

    any help would be hugely appreciated.
    Bonbon

  2. #2
    Gary''s Student
    Guest

    RE: Macro problem

    Just an example:


    In Sheet1, A1, enter: M-13.06.2005
    In Sheet1, B1, enter: =REPLACE(A1,9,2,D1) & " "&TEXT(TODAY(),"DDDDD")

    Then enter and run the following macro:

    Sub Macro1()
    Sheets("Sheet1").Select
    Sheets("Sheet1").Name = Range("B1").Value
    End Sub

    --
    Gary''s Student


    "Bonbon" wrote:

    > Is there a macro to name the sheet the name of a cell, with a slight change?
    > e.g. the cell is : M-13.06.2005, and i want the sheet to be named M-13.06.05.
    > However i would like to name 5 days of the week, everytime the macro is run,
    > i.e. it names monday-friday each time.
    >
    > any help would be hugely appreciated.
    > Bonbon


  3. #3
    Bonbon
    Guest

    RE: Macro problem

    Cool, but what should i do if i need it to name 5 days? Because that macro
    changes one sheets name.

    Thx again

    "Gary''s Student" wrote:

    > Just an example:
    >
    >
    > In Sheet1, A1, enter: M-13.06.2005
    > In Sheet1, B1, enter: =REPLACE(A1,9,2,D1) & " "&TEXT(TODAY(),"DDDDD")
    >
    > Then enter and run the following macro:
    >
    > Sub Macro1()
    > Sheets("Sheet1").Select
    > Sheets("Sheet1").Name = Range("B1").Value
    > End Sub
    >
    > --
    > Gary''s Student
    >
    >
    > "Bonbon" wrote:
    >
    > > Is there a macro to name the sheet the name of a cell, with a slight change?
    > > e.g. the cell is : M-13.06.2005, and i want the sheet to be named M-13.06.05.
    > > However i would like to name 5 days of the week, everytime the macro is run,
    > > i.e. it names monday-friday each time.
    > >
    > > any help would be hugely appreciated.
    > > Bonbon


+ 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