我想弄清楚如何将上一张纸中设定的时间换成新纸张。
我有这段代码:
Sub history()
as_index = ActiveSheet.Index
as_LR = Sheets(as_index).Cells(Sheets(as_index).Rows.Count, "A").End(xlUp).Row
wknr = DatePart("ww", Date)
For as_R = 3 To as_LR
st_new = Sheets(as_index).Cells(as_R, 1).Value
ka = Sheets(as_index).Cells(as_R, 6).Value
For s = as_index To 1 Step -1
pre_LR = Sheets(s).Cells(Sheets(s).Rows.Count, "A").End(xlUp).Row
For r = 3 To pre_LR
st_old = Sheets(s).Cells(r, 1).Value
pka = Sheets(s).Cells(r, 6).Value
pka_w = CStr(pka) & "(" & wknr & ")" & Time 'Help Help Help
If st_new = st_old Then
ka = ka & " " & pka_w
Sheets(as_index).Cells(r, 10).Value = ka
End If
Next r
Next s
Next as_R
End Sub
时间给了我现在的确切时间,而不是我从前一张纸上得到的时间。 我的目标是获取上一页的信息,包括生成数据的时间。我希望在新工作表的新单元格中使用此信息。你能帮忙吗?