ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   REPLACE FUNCTION!!!!!! (https://www.excelbanter.com/excel-discussion-misc-queries/147604-replace-function.html)

Ola2B

REPLACE FUNCTION!!!!!!
 
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.


Juskalux

REPLACE FUNCTION!!!!!!
 
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.

"Ola2B" wrote:

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.



Roger Govier

REPLACE FUNCTION!!!!!!
 
Hi

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


FormatCellsNumberCustom
mmm for Jan, Feb etc.
mmmm for January, February
--
Regards

Roger Govier


"Juskalux" wrote in message
...
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.

"Ola2B" wrote:

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.





Rick Rothstein \(MVP - VB\)

REPLACE FUNCTION!!!!!!
 
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



All times are GMT +1. The time now is 02:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com