REPLACE FUNCTION!!!!!!

O

Ola2B

I have a file which contains 3 worksheets. The problem I am having is
that every month I have had to highlight the 3 worksheets to change
the period i.e. from April to May. I use the replace function to do
this and this sometimes take too long.

What I am thinking now is inserting a 4th sheet and creating a list of
months From April to March so that once a month is selected the period
in the 3 worksheets will be authomatically replaced i.e. from April to
May. Has anyone got a better idea on how to do this using macro or any
other authomated means??


Many thanks in advance.
 
G

Guest

There's a couple of good ways to do this with functions. The simplest is to
put the formula =TODAY() in the cell, and then format the cell for any date
format you like (I'm thinking the one that says the month name and the year).
Unfortunately, there is no format which only says the month name, and
nothing else.
The other way, which is slightly more complex, is to use a combination of
the Today, Month, and Choose functions as follows:
=CHOOSE(MONTH(TODAY()), "January", "February", ..... "December")
This will give you just the current month, as text.
If you don't want it to neccessarily show the current month, you can always
off-set it by inserting +/- some number after the month function:
=CHOOSE(MONTH(TODAY())+1, "January"....)
I hope this gives you what you wanted.
 
R

Roger Govier

Hi

FYI
Unfortunately, there is no format which only says the month name, and
nothing else

Format>Cells>Number>Custom>
mmm for Jan, Feb etc.
mmmm for January, February
 
R

Rick Rothstein \(MVP - VB\)

There's a couple of good ways to do this with functions. The simplest is
to
put the formula =TODAY() in the cell, and then format the cell for any
date
format you like (I'm thinking the one that says the month name and the
year).
Unfortunately, there is no format which only says the month name, and
nothing else.
The other way, which is slightly more complex, is to use a combination of
the Today, Month, and Choose functions as follows:
=CHOOSE(MONTH(TODAY()), "January", "February", ..... "December")
This will give you just the current month, as text.
Or, you could do this...

=TEXT(TODAY(),"mmmm")

(or use "mmm" for the abbreviated month name)

Rick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top