Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 47
Default extracting only month from a date

Hello!

1 Suppose A1 has date in format dd-mm-yy , say 12-DEC-09. How can I have
extract only DEC from A1?

2 I get stucked whenever there is more than eight IF in the neseted IF
statement. Cannot we have more than 8 IF?

Please help me out.

Thanking you.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 267
Default extracting only month from a date

=MONTH(A1).

"deepak" wrote:

Hello!

1 Suppose A1 has date in format dd-mm-yy , say 12-DEC-09. How can I have
extract only DEC from A1?

2 I get stucked whenever there is more than eight IF in the neseted IF
statement. Cannot we have more than 8 IF?

Please help me out.

Thanking you.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default extracting only month from a date

1. To maintain in excel date format format the date field to MMM
(FormatCellsCustomType mmm)

OR use the below formula which will be in text format

=IF(A1,UPPER(TEXT(A1,"mmm")),"")

2. It is more than 7 and not 8. Post your scenario and there should be some
other way to acheive what you want

If this post helps click Yes
---------------
Jacob Skaria


"deepak" wrote:

Hello!

1 Suppose A1 has date in format dd-mm-yy , say 12-DEC-09. How can I have
extract only DEC from A1?

2 I get stucked whenever there is more than eight IF in the neseted IF
statement. Cannot we have more than 8 IF?

Please help me out.

Thanking you.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 26
Default extracting only month from a date

You can go to Format Cells, from "Number" tab select "Custom", in "Type"
filed type mmm or mm (as you prefer) and press OK.
--
Regards,
Pritesh


"deepak" wrote:

Hello!

1 Suppose A1 has date in format dd-mm-yy , say 12-DEC-09. How can I have
extract only DEC from A1?

2 I get stucked whenever there is more than eight IF in the neseted IF
statement. Cannot we have more than 8 IF?

Please help me out.

Thanking you.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default extracting only month from a date

Wouldn't that return the answer 12, rather than DEC?
--
David Biddulph

"Atishoo" wrote in message
...
=MONTH(A1).

"deepak" wrote:

Hello!

1 Suppose A1 has date in format dd-mm-yy , say 12-DEC-09. How can I have
extract only DEC from A1?

2 I get stucked whenever there is more than eight IF in the neseted IF
statement. Cannot we have more than 8 IF?

Please help me out.

Thanking you.





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 41
Default extracting only month from a date

Hi Deepak,

1. as regards your first part of the post, u can use the following :
=TEXT(a1,"mmmm")

2. as regards your second part of the post, u can use something like
this :
=IF(A1=1,1.3%,"")&IF(A1=2,3%,"")&IF(A1=4,6.5%,"")& IF(A1=5,2.2%,"")&IF(A1=6,4.4%,"")&IF(A1=9,7%,"")&I F(A1=10,7.5%,"")&IF(A1=11,8.8%,"")&IF(A1=3,3.5%,"" )&IF(A1=12,4.9%,"")&IF(A1=13,1%,"")&IF(A1=7,1.6%," ")&IF(A1=8,6.25%,"")

click yes below, if it helps
"deepak" wrote:

Hello!

1 Suppose A1 has date in format dd-mm-yy , say 12-DEC-09. How can I have
extract only DEC from A1?

2 I get stucked whenever there is more than eight IF in the neseted IF
statement. Cannot we have more than 8 IF?

Please help me out.

Thanking you.

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default extracting only month from a date

2 I get stucked whenever there is more than
eight IF in the neseted IF


2. It is more than 7 and not 8.


Then why does this work?

=IF(A1=1,1,IF(A1=2,2,IF(A1=3,3,IF(A1=4,4,IF(A1=5,5 ,IF(A1=6,6,IF(A1=7,7,IF(A1=8,8,"none"))))))))

There are 8 IF calls.

The first IF *is not a nested level*. Each subsequent IF is a nested level
for a total of 7 nested levels.

You can use concatenation for *many* IFs but there is usually a better way:

=IF(A1=1,1,"")&IF(A1=2,2,"")&IF(A1=3,3,"")&IF(A1=4 ,4,"")&IF(A1=5,5,"")&IF(A1=6,6,"")&IF(A1=7,7,"")&I F(A1=8,8,"")&IF(A1=9,9,"")&IF(A1=10,10,"")&IF(A1=1 1,11,"")&IF(A1=12,12,"")&IF(A1=13,13,"")&IF(A1=14, 14,"")&IF(A1=15,15,"")

Using this technique you're only limited to the max allowable length of a
formula.

--
Biff
Microsoft Excel MVP


"Jacob Skaria" wrote in message
...
1. To maintain in excel date format format the date field to MMM
(FormatCellsCustomType mmm)

OR use the below formula which will be in text format

=IF(A1,UPPER(TEXT(A1,"mmm")),"")

2. It is more than 7 and not 8. Post your scenario and there should be
some
other way to acheive what you want

If this post helps click Yes
---------------
Jacob Skaria


"deepak" wrote:

Hello!

1 Suppose A1 has date in format dd-mm-yy , say 12-DEC-09. How can I have
extract only DEC from A1?

2 I get stucked whenever there is more than eight IF in the neseted IF
statement. Cannot we have more than 8 IF?

Please help me out.

Thanking you.



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
Extracting a month name forom a date Finance Guru Excel Worksheet Functions 5 May 28th 09 05:42 PM
Extracting first value of each month Number_Cruncher Excel Worksheet Functions 3 August 6th 06 12:21 PM
Extracting month from a date field Alan Excel Discussion (Misc queries) 2 January 30th 06 10:29 PM
Extracting month as text andy wilson Excel Worksheet Functions 1 December 13th 05 12:43 PM
Formula for Extracting Month out of a Date column PokerZan Excel Discussion (Misc queries) 3 June 10th 05 08:30 PM


All times are GMT +1. The time now is 12:49 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"