使用Excel中的按钮将时间单元格增加或减少15分钟

时间:2019-01-24 14:11:59

标签: excel

我有一个时间单元,我想通过单击上或下按钮来增加或减少15分钟。我用正常数字计算出来,但是随着时间的流逝,我无法做到。

感谢任何想法。

2 个答案:

答案 0 :(得分:4)

使用encoding_dim = 1920 input_img = Input(shape=(1920,)) encoded = Dense(encoding_dim, activation='relu')(input_img) decoded = Dense(1920, activation='sigmoid')(encoded) autoencoder = Model(input_img, decoded) encoder = Model(input_img, encoded) encoded_input = Input(shape=(encoding_dim,)) decoder_layer = autoencoder.layers[-1] decoder = Model(encoded_input, decoder_layer(encoded_input)) autoencoder.compile(optimizer='adadelta', loss='binary_crossentropy')`` print(autoencoder.summary()) autoencoder.fit(x_train, x_train, epochs=2,batch_size=100,shuffle=True,validation_data=(x_test, x_test)) ValueError: Error when checking input: expected input_1 to have shape 函数

例如DateAdd的时间戳记为Cells(1,1),然后加上15分钟:

1:00

或减去:

Cells(2,1) = DateAdd("n", 15, Cells(1,1))

Cells(2,1) = DateAdd("n", -15, Cells(1,1)) 告诉Excel使用minutes进行计算,某些研究会为您带来here

答案 1 :(得分:2)

以下是单元格 A1 的示例:

Sub IncreaseTime()
    With Range("A1")
        .Value = .Value + TimeSerial(0, 15, 0)
    End With
End Sub

Sub DecreaseTime()
    With Range("A1")
        .Value = .Value - TimeSerial(0, 15, 0)
    End With
End Sub