I cant get the condA or condB to execute if value of A1 fall within range 1
to 10
if(and(A1 >= 1, A1 <= 10), condA, condB)

How to get the month with a increment value as below


a b c 0 mth inc
2 mth inc
1
2
3 30-may-08 =text(c3,"mmm") will get
value of "may" how to get "jul"
4

Re: test value between range, and month by Shane

Shane
Sun May 11 12:04:44 CDT 2008

Hi,

Question1: not clear, as written you are missing the = sign in front of IF.
But there is nothing wrong with the construction. Tell us what is in A1 and
what condA, condB are. (The second argument of an IF statement is not a
condition by the TRUE portion and the third part is the FALSE portion).

Question 2: The easy way:
Assume the dates are in column A, in column C enter the formula =A3 and then
format the cell MMM. To do that select the range where you enter the
formulas and choose Format, Cells, Number tab, Custom and on the Type line
enter MMM.

Cheers,
Shane Devenshire
Microsoft Excel MVP

"crapit" <biggercrap@yahoo.com> wrote in message
news:ey9z5i2sIHA.5268@TK2MSFTNGP06.phx.gbl...
> I cant get the condA or condB to execute if value of A1 fall within range
> 1 to 10
> if(and(A1 >= 1, A1 <= 10), condA, condB)
>
> How to get the month with a increment value as below
>
>
> a b c 0 mth inc 2
> mth inc
> 1
> 2
> 3 30-may-08 =text(c3,"mmm") will get
> value of "may" how to get "jul"
> 4
>
>

Re: test value between range, and month by GB

GB
Sun May 11 13:03:00 CDT 2008


"Shane Devenshire" <shanedevenshire@sbcglobal.net> wrote in message
news:eH1hA54sIHA.4912@TK2MSFTNGP03.phx.gbl...
> Hi,
>
> Question1: not clear, as written you are missing the = sign in front of
> IF. But there is nothing wrong with the construction. Tell us what is in
> A1 and what condA, condB are. (The second argument of an IF statement is
> not a condition by the TRUE portion and the third part is the FALSE
> portion).
>
> Question 2: The easy way:
> Assume the dates are in column A, in column C enter the formula =A3 and
> then format the cell MMM. To do that select the range where you enter the
> formulas and choose Format, Cells, Number tab, Custom and on the Type line
> enter MMM.

The OP wants to increment the month as well, so a date in May = > July as
the answer. The following does it:

=TEXT(EOMONTH(A1,2),"MMM")

The 2 above does the incrementing by 2 months, so change it for different
increment




Re: test value between range, and month by crapit

crapit
Sun May 11 21:05:40 CDT 2008

Thanks for the 2nd answer.
"GB" <NOTsomeone@microsoft.com> wrote in message
news:482734da$0$2477$da0feed9@news.zen.co.uk...
>
> "Shane Devenshire" <shanedevenshire@sbcglobal.net> wrote in message
> news:eH1hA54sIHA.4912@TK2MSFTNGP03.phx.gbl...
>> Hi,
>>
>> Question1: not clear, as written you are missing the = sign in front of
>> IF. But there is nothing wrong with the construction. Tell us what is in
>> A1 and what condA, condB are. (The second argument of an IF statement is
>> not a condition by the TRUE portion and the third part is the FALSE
>> portion).
>>
>> Question 2: The easy way:
>> Assume the dates are in column A, in column C enter the formula =A3 and
>> then format the cell MMM. To do that select the range where you enter
>> the formulas and choose Format, Cells, Number tab, Custom and on the Type
>> line enter MMM.
>
> The OP wants to increment the month as well, so a date in May = > July as
> the answer. The following does it:
>
> =TEXT(EOMONTH(A1,2),"MMM")
>
> The 2 above does the incrementing by 2 months, so change it for different
> increment
>
>
>



Re: test value between range, and month by crapit

crapit
Sun May 11 21:12:30 CDT 2008

oops, =if(and(day(A1) >= 1, day(A1) <= 10), condA, condB)

"Shane Devenshire" <shanedevenshire@sbcglobal.net> wrote in message
news:eH1hA54sIHA.4912@TK2MSFTNGP03.phx.gbl...
> Hi,
>
> Question1: not clear, as written you are missing the = sign in front of
> IF. But there is nothing wrong with the construction. Tell us what is in
> A1 and what condA, condB are. (The second argument of an IF statement is
> not a condition by the TRUE portion and the third part is the FALSE
> portion).
>
> Question 2: The easy way:
> Assume the dates are in column A, in column C enter the formula =A3 and
> then format the cell MMM. To do that select the range where you enter the
> formulas and choose Format, Cells, Number tab, Custom and on the Type line
> enter MMM.
>
> Cheers,
> Shane Devenshire
> Microsoft Excel MVP
>
> "crapit" <biggercrap@yahoo.com> wrote in message
> news:ey9z5i2sIHA.5268@TK2MSFTNGP06.phx.gbl...
>> I cant get the condA or condB to execute if value of A1 fall within range
>> 1 to 10
>> if(and(A1 >= 1, A1 <= 10), condA, condB)
>>
>> How to get the month with a increment value as below
>>
>>
>> a b c 0 mth inc 2
>> mth inc
>> 1
>> 2
>> 3 30-may-08 =text(c3,"mmm") will get
>> value of "may" how to get "jul"
>> 4
>>
>>



Re: test value between range, and month by crapit

crapit
Sun May 11 22:28:52 CDT 2008

Oh, thnk for all the help. it works. Strange, couldnt get it at workplace,
but working at home
"crapit" <biggercrap@yahoo.com> wrote in message
news:OiKyhW9sIHA.5580@TK2MSFTNGP04.phx.gbl...
> oops, =if(and(day(A1) >= 1, day(A1) <= 10), condA, condB)
>
> "Shane Devenshire" <shanedevenshire@sbcglobal.net> wrote in message
> news:eH1hA54sIHA.4912@TK2MSFTNGP03.phx.gbl...
>> Hi,
>>
>> Question1: not clear, as written you are missing the = sign in front of
>> IF. But there is nothing wrong with the construction. Tell us what is in
>> A1 and what condA, condB are. (The second argument of an IF statement is
>> not a condition by the TRUE portion and the third part is the FALSE
>> portion).
>>
>> Question 2: The easy way:
>> Assume the dates are in column A, in column C enter the formula =A3 and
>> then format the cell MMM. To do that select the range where you enter
>> the formulas and choose Format, Cells, Number tab, Custom and on the Type
>> line enter MMM.
>>
>> Cheers,
>> Shane Devenshire
>> Microsoft Excel MVP
>>
>> "crapit" <biggercrap@yahoo.com> wrote in message
>> news:ey9z5i2sIHA.5268@TK2MSFTNGP06.phx.gbl...
>>> I cant get the condA or condB to execute if value of A1 fall within
>>> range 1 to 10
>>> if(and(A1 >= 1, A1 <= 10), condA, condB)
>>>
>>> How to get the month with a increment value as below
>>>
>>>
>>> a b c 0 mth inc
>>> 2 mth inc
>>> 1
>>> 2
>>> 3 30-may-08 =text(c3,"mmm") will get
>>> value of "may" how to get "jul"
>>> 4
>>>
>>>
>
>