Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Cell Formating 1

Status
Not open for further replies.

xsubzeroz

Technical User
Joined
Oct 15, 2002
Messages
39
Location
CA
I have in cell A1 a date 1/15/02 that I entered, so I used "Format Cell"--> "Number" Tab and I choosed "Date". Now in cell B1 I want to show month January and in cell C1 I want to show number if January then 1, 1-12 according to month. I tried to use IF command but I'm limited to 7 IFs max. Is there any way I can do this. The most important to me is when I enter date in A1 is to give me number in C1. Please help.
 
Much easier than you'd think
In B1 & C1 enter
=A1

format B1 as Custom "MMMM" and C1 as custom "M"
Rgds
~Geoff~
 
Thank you that was helpful but one more thing that I need. I have in another cell A10 statement that says if C1 is "1" then =F1, IF C1 is "2" then =F2 for 12 months. I typed that but it doesn't recognize cell C1 as "1", it shows "1" in cell C1 but IF statement says it is FALSE. Maybe you can help me with this too. Thank you.
 
C1 is not 1 - it is just formatted to show the month which is one
use
=if(month(c1)=1,F2 etc etc Rgds
~Geoff~
 
Thank again Geoff and that was useful. Sorry to bother you but in cell A10 I need to enter this as one formula. If I use "=if(month(c1)=1,F1,if(month(c1)=2,F2,if(month(c1)=3,F3 etc etc" I can only use 7 IFs commands. I got 12 numbers to work with: from F1 to F12. Is there any other way to make C1 (formated as date) to indicate as number 1.
 
Actually Geoff I just figured out with your inputs and little bit of trying. I typed in cell C1 "=IF(MONTH(K4),MONTH(K4)) and formated cell as general, and that returned my cell to true number display. Thanks a lot.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top