IF Statement

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
Hi

Try
=CHOOSE(A1,"January","February","March", ,,,,,, ,"December"))
Fill in the complete range of Months in upper or lower case as you
prefer.
 
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...
 
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"))
 
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
 
Roger,

Thanks alot....

It Works....

Roger Govier said:
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"))
 

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

Similar Threads


Back
Top