ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   extracting only month from a date (https://www.excelbanter.com/excel-discussion-misc-queries/241866-extracting-only-month-date.html)

Deepak

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.


Atishoo

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.


Jacob Skaria

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.


Pritesh[_2_]

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.


David Biddulph[_2_]

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.




YESHWANT

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.


T. Valko

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.





All times are GMT +1. The time now is 05:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com