Shorten If Then formula that determines next number

test_man2

New Member
Joined
Aug 28, 2007
Messages
35
Office Version
  1. 365
Platform
  1. Windows
Greetings! I'm sure there's a simple solution, but I can't find seem to find it! I'm (still) working on a perpetual calendar but this time showing the dates of the month in rows across. I have this long convoluted formula that I'm sure can be simplified - "IF(G8=1,G8+1,IF(G8=2,G8+1,IF(G8=3,G8+1,IF(G8=4,G8+1,IF(G8=5,G8+1,IF(G8=6,G8+1," "))))))" - to determine the next number in the sequence (the first column is the month, and columns B - G have other formulas). How can I simplify this string so that it adds +1 to the number if the previous cell is one of the numbers between 1 - 6? Is there a simpler solution than saying "If(OR(G8=1, G8=2,G8=3..." etc up to G8=6?

Another issue I'm having is with determining when March begins because of Leap Year adding a day in February! I'll post that question separately later when I have time to.
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
How about:
Excel Formula:
=IF(G8<=6,G8+1,...
 
Upvote 0
Solution
You are welcome.
Glad I was able to help!
 
Upvote 0

Forum statistics

Threads
1,215,047
Messages
6,122,858
Members
449,096
Latest member
Erald

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top