#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default IF Statement

Hi there,

I am trying to write this formula. There are 2 sheets in spreadsheet I am
using refernce from this one cell that has numbers in there.

In another sheet i am refernceing it in an If STMT the Cell has 1, The cell
in the next sheet will select "January". Something like this for all 12
months:

IF(Main_Sheet!B2=1,"JANUARY"), if(Main_Sheet!B2=2,"FEBRUARY"),
IF(Main_Sheet!B2=3,"MARCH"), IF(Main_Sheet!B2=4,"APRIL"),
IF(Main_Sheet!B2=5,"MAY"), IF (Main_Sheet!B2=5,"MAY"),
IF(Main_Sheet!B2=5,"MAY"), IF (Main_Sheet!B2=6,"JUNE"), IF
(Main_Sheet!B2=7,"JULY€¯), IF(Main_Sheet!B2=8,"AUGUST"),
IF(Main_Sheet!B2=9,"SEPTEMBER"), IF(Main_Sheet!B2=10,"OCTOBER"),
IF(Main_Sheet!B2=11,"NOVEMBER"), IF(Main_Sheet!B2=12,"DECEMEBR")


Please help me out with this formula. Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,886
Default IF Statement

Hi

Try
=CHOOSE(A1,"January","February","March", ,,,,,, ,"December"))
Fill in the complete range of Months in upper or lower case as you
prefer.
--
Regards

Roger Govier


"Deezel" wrote in message
...
Hi there,

I am trying to write this formula. There are 2 sheets in spreadsheet I
am
using refernce from this one cell that has numbers in there.

In another sheet i am refernceing it in an If STMT the Cell has 1, The
cell
in the next sheet will select "January". Something like this for all
12
months:

IF(Main_Sheet!B2=1,"JANUARY"), if(Main_Sheet!B2=2,"FEBRUARY"),
IF(Main_Sheet!B2=3,"MARCH"), IF(Main_Sheet!B2=4,"APRIL"),
IF(Main_Sheet!B2=5,"MAY"), IF (Main_Sheet!B2=5,"MAY"),
IF(Main_Sheet!B2=5,"MAY"), IF (Main_Sheet!B2=6,"JUNE"), IF
(Main_Sheet!B2=7,"JULY"), IF(Main_Sheet!B2=8,"AUGUST"),
IF(Main_Sheet!B2=9,"SEPTEMBER"), IF(Main_Sheet!B2=10,"OCTOBER"),
IF(Main_Sheet!B2=11,"NOVEMBER"), IF(Main_Sheet!B2=12,"DECEMEBR")


Please help me out with this formula. Thanks



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 225
Default IF Statement

...or, for less typing: =TEXT(DATE(1,A1,1),"mmmm")


Roger Govier wrote:
Hi

Try
=CHOOSE(A1,"January","February","March", ,,,,,, ,"December"))
Fill in the complete range of Months in upper or lower case as you
prefer.
--
Regards

Roger Govier


"Deezel" wrote in message
...
Hi there,

I am trying to write this formula. There are 2 sheets in spreadsheet I
am
using refernce from this one cell that has numbers in there.

In another sheet i am refernceing it in an If STMT the Cell has 1, The
cell
in the next sheet will select "January". Something like this for all
12
months:

IF(Main_Sheet!B2=1,"JANUARY"), if(Main_Sheet!B2=2,"FEBRUARY"),
IF(Main_Sheet!B2=3,"MARCH"), IF(Main_Sheet!B2=4,"APRIL"),
IF(Main_Sheet!B2=5,"MAY"), IF (Main_Sheet!B2=5,"MAY"),
IF(Main_Sheet!B2=5,"MAY"), IF (Main_Sheet!B2=6,"JUNE"), IF
(Main_Sheet!B2=7,"JULY"), IF(Main_Sheet!B2=8,"AUGUST"),
IF(Main_Sheet!B2=9,"SEPTEMBER"), IF(Main_Sheet!B2=10,"OCTOBER"),
IF(Main_Sheet!B2=11,"NOVEMBER"), IF(Main_Sheet!B2=12,"DECEMEBR")


Please help me out with this formula. Thanks


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,886
Default IF Statement

Hi Andrew

I'm all for saving on typing. Very neat!

--
Regards

Roger Govier


"Andrew Taylor" wrote in message
ups.com...
..or, for less typing: =TEXT(DATE(1,A1,1),"mmmm")


Roger Govier wrote:
Hi

Try
=CHOOSE(A1,"January","February","March", ,,,,,, ,"December"))
Fill in the complete range of Months in upper or lower case as you
prefer.
--
Regards

Roger Govier


"Deezel" wrote in message
...
Hi there,

I am trying to write this formula. There are 2 sheets in
spreadsheet I
am
using refernce from this one cell that has numbers in there.

In another sheet i am refernceing it in an If STMT the Cell has 1,
The
cell
in the next sheet will select "January". Something like this for
all
12
months:

IF(Main_Sheet!B2=1,"JANUARY"), if(Main_Sheet!B2=2,"FEBRUARY"),
IF(Main_Sheet!B2=3,"MARCH"), IF(Main_Sheet!B2=4,"APRIL"),
IF(Main_Sheet!B2=5,"MAY"), IF (Main_Sheet!B2=5,"MAY"),
IF(Main_Sheet!B2=5,"MAY"), IF (Main_Sheet!B2=6,"JUNE"), IF
(Main_Sheet!B2=7,"JULY"), IF(Main_Sheet!B2=8,"AUGUST"),
IF(Main_Sheet!B2=9,"SEPTEMBER"), IF(Main_Sheet!B2=10,"OCTOBER"),
IF(Main_Sheet!B2=11,"NOVEMBER"), IF(Main_Sheet!B2=12,"DECEMEBR")


Please help me out with this formula. Thanks




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default IF Statement

Sorry I am still not clear

There are two Sheets

* In one sheet the user will enter the number of a month... Lets say 1 for
Jan....
* The other sheet will look at the number the user as entered in that cell
and will PRINT the name of the month in that cell

I tried to write something like this:

IF(Main_Sheet!B2=1,"JANUARY"), if(Main_Sheet!B2=2,"FEBRUARY")....... goes
upto december

Please help...

thanks...

"Andrew Taylor" wrote:

...or, for less typing: =TEXT(DATE(1,A1,1),"mmmm")


Roger Govier wrote:
Hi

Try
=CHOOSE(A1,"January","February","March", ,,,,,, ,"December"))
Fill in the complete range of Months in upper or lower case as you
prefer.
--
Regards

Roger Govier


"Deezel" wrote in message
...
Hi there,

I am trying to write this formula. There are 2 sheets in spreadsheet I
am
using refernce from this one cell that has numbers in there.

In another sheet i am refernceing it in an If STMT the Cell has 1, The
cell
in the next sheet will select "January". Something like this for all
12
months:

IF(Main_Sheet!B2=1,"JANUARY"), if(Main_Sheet!B2=2,"FEBRUARY"),
IF(Main_Sheet!B2=3,"MARCH"), IF(Main_Sheet!B2=4,"APRIL"),
IF(Main_Sheet!B2=5,"MAY"), IF (Main_Sheet!B2=5,"MAY"),
IF(Main_Sheet!B2=5,"MAY"), IF (Main_Sheet!B2=6,"JUNE"), IF
(Main_Sheet!B2=7,"JULY"), IF(Main_Sheet!B2=8,"AUGUST"),
IF(Main_Sheet!B2=9,"SEPTEMBER"), IF(Main_Sheet!B2=10,"OCTOBER"),
IF(Main_Sheet!B2=11,"NOVEMBER"), IF(Main_Sheet!B2=12,"DECEMEBR")


Please help me out with this formula. Thanks





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,886
Default IF Statement

Hi

Just substitute your cell location (Main_Sheet!B2) for A1 in either
method

Using Andrew's solution
=TEXT(DATE(1,Main_Sheet!B2,1),"mmmm")
or using mine
=CHOOSE(Main_Sheet!B2,"January","February","March" , ,,,,,, ,"December"))

--
Regards

Roger Govier


"Deezel" wrote in message
...
Sorry I am still not clear

There are two Sheets

* In one sheet the user will enter the number of a month... Lets say 1
for
Jan....
* The other sheet will look at the number the user as entered in that
cell
and will PRINT the name of the month in that cell

I tried to write something like this:

IF(Main_Sheet!B2=1,"JANUARY"), if(Main_Sheet!B2=2,"FEBRUARY").......
goes
upto december

Please help...

thanks...

"Andrew Taylor" wrote:

...or, for less typing:


Roger Govier wrote:
Hi

Try
=CHOOSE(A1,"January","February","March", ,,,,,, ,"December"))
Fill in the complete range of Months in upper or lower case as you
prefer.
--
Regards

Roger Govier


"Deezel" wrote in message
...
Hi there,

I am trying to write this formula. There are 2 sheets in
spreadsheet I
am
using refernce from this one cell that has numbers in there.

In another sheet i am refernceing it in an If STMT the Cell has
1, The
cell
in the next sheet will select "January". Something like this for
all
12
months:

IF(Main_Sheet!B2=1,"JANUARY"), if(Main_Sheet!B2=2,"FEBRUARY"),
IF(Main_Sheet!B2=3,"MARCH"), IF(Main_Sheet!B2=4,"APRIL"),
IF(Main_Sheet!B2=5,"MAY"), IF (Main_Sheet!B2=5,"MAY"),
IF(Main_Sheet!B2=5,"MAY"), IF (Main_Sheet!B2=6,"JUNE"), IF
(Main_Sheet!B2=7,"JULY"), IF(Main_Sheet!B2=8,"AUGUST"),
IF(Main_Sheet!B2=9,"SEPTEMBER"), IF(Main_Sheet!B2=10,"OCTOBER"),
IF(Main_Sheet!B2=11,"NOVEMBER"), IF(Main_Sheet!B2=12,"DECEMEBR")


Please help me out with this formula. Thanks





  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 510
Default IF Statement

Hi,

Andrew's formula is really smart and BRILLIANT ... !!!

It replaces all your If's or a lookup() function ...
in any cell of the destination sheet, just type :

=TEXT(DATE(1,Main_Sheet!B2,1),"mmmm")


HTH
Carim

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default IF Statement

Roger,

Thanks alot....

It Works....

"Roger Govier" wrote:

Hi

Just substitute your cell location (Main_Sheet!B2) for A1 in either
method

Using Andrew's solution
=TEXT(DATE(1,Main_Sheet!B2,1),"mmmm")
or using mine
=CHOOSE(Main_Sheet!B2,"January","February","March" , ,,,,,, ,"December"))

--
Regards

Roger Govier


"Deezel" wrote in message
...
Sorry I am still not clear

There are two Sheets

* In one sheet the user will enter the number of a month... Lets say 1
for
Jan....
* The other sheet will look at the number the user as entered in that
cell
and will PRINT the name of the month in that cell

I tried to write something like this:

IF(Main_Sheet!B2=1,"JANUARY"), if(Main_Sheet!B2=2,"FEBRUARY").......
goes
upto december

Please help...

thanks...

"Andrew Taylor" wrote:

...or, for less typing:


Roger Govier wrote:
Hi

Try
=CHOOSE(A1,"January","February","March", ,,,,,, ,"December"))
Fill in the complete range of Months in upper or lower case as you
prefer.
--
Regards

Roger Govier


"Deezel" wrote in message
...
Hi there,

I am trying to write this formula. There are 2 sheets in
spreadsheet I
am
using refernce from this one cell that has numbers in there.

In another sheet i am refernceing it in an If STMT the Cell has
1, The
cell
in the next sheet will select "January". Something like this for
all
12
months:

IF(Main_Sheet!B2=1,"JANUARY"), if(Main_Sheet!B2=2,"FEBRUARY"),
IF(Main_Sheet!B2=3,"MARCH"), IF(Main_Sheet!B2=4,"APRIL"),
IF(Main_Sheet!B2=5,"MAY"), IF (Main_Sheet!B2=5,"MAY"),
IF(Main_Sheet!B2=5,"MAY"), IF (Main_Sheet!B2=6,"JUNE"), IF
(Main_Sheet!B2=7,"JULY"), IF(Main_Sheet!B2=8,"AUGUST"),
IF(Main_Sheet!B2=9,"SEPTEMBER"), IF(Main_Sheet!B2=10,"OCTOBER"),
IF(Main_Sheet!B2=11,"NOVEMBER"), IF(Main_Sheet!B2=12,"DECEMEBR")


Please help me out with this formula. Thanks





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL concatenation statement CLamar Excel Discussion (Misc queries) 0 June 29th 06 01:58 PM
SET statement tutorial Daminc Excel Discussion (Misc queries) 13 January 17th 06 04:47 PM
Long IF Statement rmitchell87 Excel Discussion (Misc queries) 2 October 2nd 05 03:50 AM
If statement Matt Montagliano Excel Discussion (Misc queries) 1 September 8th 05 08:47 PM
Do I need a sumif or sum of a vlookup formula? PeterB Excel Worksheet Functions 0 June 1st 05 12:23 PM


All times are GMT +1. The time now is 09:53 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"