Link to home
Start Free TrialLog in
Avatar of swjtx99
swjtx99

asked on

+1 to an even value

Hi, I have a simple formula in a cell.

Weeknum(A2)

When (IF) the value returned is an even number, I want the result returned to be +1.

In other words if the Weeknum returned is 2, I want to add 1 so it returns a 3.

Thanks in advance,

swjtx99
ASKER CERTIFIED SOLUTION
Avatar of Rgonzo1971
Rgonzo1971

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Norie
Norie

Try this.
=WEEKNUM(A2)+(MOD(WEEKNUM(A2),2)=0)
You could also adjust when the week starts. See this article.
Avatar of swjtx99

ASKER

Hi Rgonzo1971. That did it. Thanks

Hi Norie, I thought yours worked however it's counting Saturdays as in the next week instead of the week that the preceding friday is in. For example, 16 Jan 2016 is a Saturday in week number 3. Your formula produced a 5 (assumed it counted it as week 4 and added the +1). This was consistent each week.

Hi Martin, Thanks for the suggestion but am trying to align data with 2 week periods so not what I was after.

Thanks all for responding.

Best regards,

swjtx99