We help IT Professionals succeed at work.

Converting data to time

93 Views
Last Modified: 2017-03-29
Cell A1 contains a value, I want to add one hour to that number and display in the next row down.  I need to do this for the next 30 rows down.  The problem I am having is once I get to 12,  I don't know how to make the next number 1, instead of 13.  Below is how I need it to look
8
9
10
11
12
1
2
3
4
5
6
7
8
9
10
11
12
1, and so on.
Comment
Watch Question

Subodh Tiwari (Neeraj)Excel & VBA Expert
CERTIFIED EXPERT
Most Valuable Expert 2018
Awarded 2015

Commented:
One way...
In A2
=IF(A1=12,1,A1+1)

Open in new window

and copy it down.
Retired
CERTIFIED EXPERT
Top Expert 2012
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
ShumsManaging Director/Excel VBA Developer
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
If you want to fill without formula then follow these steps to enter 1-hour time increments in the range A1:A30:
1. Select A1:A30
2. Right-click the selection and select Format Cells.
3. Click Time and select 1:30 PM and click OK.
4. Click A1 and enter 08:00 AM (or whatever time you like to enter)
5. Select A2:A30 and enter =A1+Time(1,0,0)
6. Press [Ctrl][Enter]
Excel fills the range with 1-Hour time increments.
Please find attached for reference:
Increment-1-Hour.xlsx

Author

Commented:
Thank You