How can I add dates to column but repeat each 24 times, in Excel?

前端 未结 2 922
独厮守ぢ
独厮守ぢ 2021-01-26 00:06

Here is a sample from the data that I am looking at.

Hour Index  Visits
    0   67
    1   22
    2   111
    3   22
    4   0
    5   0
    6   22
    7   44
           


        
相关标签:
2条回答
  • 2021-01-26 00:29

    Please try: =UPPER(TEXT(DAY(2+A2/24),"ffffdd")). The first 2 is to control when the sequence starts.

    0 讨论(0)
  • 2021-01-26 00:30

    try to use this formula (I suppose that your Hour column starts from A2 cell):

    =TEXT(1+MOD(1+INT(A2/24),7),"ffffdd")
    

    Note, that formula works well if your excel dates starts from 01.01.1900 (which is usually default for excel on PC). If you are using 1904 date system, you should use next formula:

    =TEXT(2+MOD(1+INT(A2/24),7),"ffffdd")
    
    0 讨论(0)
提交回复
热议问题