Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
SQL concatenation statement | Excel Discussion (Misc queries) | |||
SET statement tutorial | Excel Discussion (Misc queries) | |||
Long IF Statement | Excel Discussion (Misc queries) | |||
If statement | Excel Discussion (Misc queries) | |||
Do I need a sumif or sum of a vlookup formula? | Excel Worksheet Functions |