ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   If formula with 12 conditions (https://www.excelbanter.com/excel-discussion-misc-queries/20957-if-formula-12-conditions.html)

tkacoo

If formula with 12 conditions
 
I have a date column and I want another column to sort only by the month of
the date column. So I want column B to look at column A and only read the
month - then translate it to a number.
If the first 2 numbers in (a2=01 then b3=1 , or a2=02 then b3=2, or a2=03
then b3=3.... ect)
Can this be done?



Hi
You could try something like
=TEXT(A2,"mm")
in B3.
Or simply
=MONTH(A2)

--
Andy.


"tkacoo" wrote in message
...
I have a date column and I want another column to sort only by the month of
the date column. So I want column B to look at column A and only read the
month - then translate it to a number.
If the first 2 numbers in (a2=01 then b3=1 , or a2=02 then b3=2, or a2=03
then b3=3.... ect)
Can this be done?




tkacoo

Thank you... you are awesome!!!!
used =MONTH(A2)
Worked perfect!!!

"Andy B" wrote:

Hi
You could try something like
=TEXT(A2,"mm")
in B3.
Or simply
=MONTH(A2)

--
Andy.


"tkacoo" wrote in message
...
I have a date column and I want another column to sort only by the month of
the date column. So I want column B to look at column A and only read the
month - then translate it to a number.
If the first 2 numbers in (a2=01 then b3=1 , or a2=02 then b3=2, or a2=03
then b3=3.... ect)
Can this be done?






Thanks for the feedback! Glad to help.

--
Andy.


"tkacoo" wrote in message
...
Thank you... you are awesome!!!!
used =MONTH(A2)
Worked perfect!!!

"Andy B" wrote:

Hi
You could try something like
=TEXT(A2,"mm")
in B3.
Or simply
=MONTH(A2)

--
Andy.


"tkacoo" wrote in message
...
I have a date column and I want another column to sort only by the month
of
the date column. So I want column B to look at column A and only read
the
month - then translate it to a number.
If the first 2 numbers in (a2=01 then b3=1 , or a2=02 then b3=2, or
a2=03
then b3=3.... ect)
Can this be done?







tkacoo

Hope your still here... I have one more condition...
If the A2 is blank, b3 should be blank ...

"Andy B" wrote:

Thanks for the feedback! Glad to help.

--
Andy.


"tkacoo" wrote in message
...
Thank you... you are awesome!!!!
used =MONTH(A2)
Worked perfect!!!

"Andy B" wrote:

Hi
You could try something like
=TEXT(A2,"mm")
in B3.
Or simply
=MONTH(A2)

--
Andy.


"tkacoo" wrote in message
...
I have a date column and I want another column to sort only by the month
of
the date column. So I want column B to look at column A and only read
the
month - then translate it to a number.
If the first 2 numbers in (a2=01 then b3=1 , or a2=02 then b3=2, or
a2=03
then b3=3.... ect)
Can this be done?









Hi
Try this:
=IF(A2<0,MONTH(A2),"")

--
Andy.


"tkacoo" wrote in message
...
Hope your still here... I have one more condition...
If the A2 is blank, b3 should be blank ...

"Andy B" wrote:

Thanks for the feedback! Glad to help.

--
Andy.


"tkacoo" wrote in message
...
Thank you... you are awesome!!!!
used =MONTH(A2)
Worked perfect!!!

"Andy B" wrote:

Hi
You could try something like
=TEXT(A2,"mm")
in B3.
Or simply
=MONTH(A2)

--
Andy.


"tkacoo" wrote in message
...
I have a date column and I want another column to sort only by the
month
of
the date column. So I want column B to look at column A and only
read
the
month - then translate it to a number.
If the first 2 numbers in (a2=01 then b3=1 , or a2=02 then b3=2, or
a2=03
then b3=3.... ect)
Can this be done?











All times are GMT +1. The time now is 12:55 AM.

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