Avatar of sandramac
sandramac
 asked on

Converting data to time

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.
Microsoft ExcelMicrosoft Office

Avatar of undefined
Last Comment
sandramac

8/22/2022 - Mon
Subodh Tiwari (Neeraj)

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

Open in new window

and copy it down.
ASKER CERTIFIED SOLUTION
GrahamSkan

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Shums Faruk

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
sandramac

ASKER
Thank You
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck