test value between range, and month

  • Thread starter Thread starter crapit
  • Start date Start date
C

crapit

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
 
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
 
Shane Devenshire said:
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
 
Thanks for the 2nd answer.
GB said:
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
 
Oh, thnk for all the help. it works. Strange, couldnt get it at workplace,
but working at home
 
Back
Top