例如:
=today()-mod(today(),7)+9
這樣就是計算下個星期一。
關於MOD函數: https://support.microsoft.com/zh-tw/office/mod-%E5%87%BD%E6%95%B8-9b6cd169-b6ee-406a-a97b-edf2a9dc24f3

=today()-mod(today(),7)+9
=index(要回傳的欄位,match(要結合的目標,要查找的目標,0))例如。
=index(F:F,match(A1&B1&C1,D1&E1,0))或可以用字串的方式,例如。
=index(F:F,match(A1&B1&"專案X"&C1,D1&E1,0))
| A | B | C |
| 4 | 4 | 5 |
| 3 | 3 | 5 |
| 4 | 4 | 5 |
| 3 | 3 | 5 |
| 2 | 2 | 5 |
| 2 | 2 | 3 |
=SUMIF(A:A,B:B,C:C)
=sum(if(A:A=B:B,C:C,""))
=sum(if(A:A=B:B,C:C,""))
=ArrayFormula(=sum(if(A:A=B:B,C:C,"")))
F1::
Loop, Read, %A_ScriptDir%\test.txt
{
LineNumber := A_Index ;先令Loop, Read得到的A_Index(此處為行數)為變數LineNumber
Loop, parse, A_LoopReadLine, CSV ;以CVS格式切每行內容(用逗號切)
{
if A_Index = 1 ;意思是擷取每行第1個(在此為時間)
%LineNumber%_%A_Index% := A_LoopField
if A_Index = 2 ;意思是擷取每行第2個(在此為內容)
%LineNumber%_%A_Index% := A_LoopField
}
}
front = 1
loop, 2
{
back = 1
loop, 2
{
msgbox, % %front%_%back% ;組合變數的方式在最前面加一個%
back := back + 1
}
front := front + 1
}
return
; ==============================GUI全域設定==============================
GuiCloseOK:
GuiControlGet, MyEdit ;輸入內容存為變數MyEdit
Gui, Destroy
return
GuiCloseCancel:
MyEdit:=""
Gui, Destroy
return
; ==============================全域設定結束==============================
::/test::
Gui, Color, White
Gui, Add, Edit, x22 y19 w240 h120 vMyEdit, 異動了甚麼? ;GUI內文,輸入內容寫入MyEdit
Gui, Add, Button, x22 y179 w100 h30 gGuiCloseOk, Ok ;GUI點OK觸發gGuiCloseOk
Gui, Show, w286 h231, log ;GUI標題
WinGetPos,,, Width, Height, log ;取得視窗座標
WinMove, log,, (A_ScreenWidth/2)-(Width/2), (A_ScreenHeight/2)-(Height/2) ;調整視窗座標
WinWaitClose, log
Gui, Destroy ;關閉GUI
StringReplace, MyEdit, MyEdit, `r`n, , All ; 移除MyEdit中所有的 CR+LF
Sleep, 5000 ;卸載後無法馬上解析檔案,停留5秒
; 以HashMyFiles.exe將目標檔案輸出MD5至txt,排除SHA1、CRC32、SHA256、SHA512、SHA384
Run "%A_ScriptDir%\..\Tools\hashmyfiles-x64\HashMyFiles.exe" /SHA1 0 /CRC32 0 /SHA256 0 /SHA512 0 /SHA384 0 /SaveDirect /file %DropboxDIR%\%file% /scomma %DropboxDIR%\temp.txt
SetTimer, fileMD5check, -10000 ;10秒後執行fileMD5check
return
fileMD5check:
Loop, Read, %DropboxDIR%\temp.txt
{
LineNumber := A_Index ;先令Loop, Read得到的A_Index(此處為行數)為變數LineNumber
Loop, parse, A_LoopReadLine, CSV ;以CVS格式切每行內容(用逗號切)
{
if A_Index = 1 ;意思是擷取每行第1個(在此為檔名)
FileAppend, %A_YYYY%/%A_MM%/%A_DD% %A_Hour%:%A_Min%:%A_Sec%@%A_ComputerName%`,%A_LoopField%`,, %DropboxDIR%\md5.txt ;時間、電腦名稱、檔名寫入文字文件
if A_Index = 2 ;意思是擷取每行第2個(在此為MD5)
FileAppend, %A_LoopField%`,%MyEdit%`n, %DropboxDIR%\md5.txt ;MD5、輸入的文字寫入文字文件
}
FileDelete, %DropboxDIR%\temp.txt
Gui, +AlwaysOnTop +Disabled -SysMenu +Owner ; +Owner 避免顯示任務欄按鈕.
Gui, Color, White
Gui, Add, Text,, file MD5 hash value checksum done!`r`nMD5 is %A_LoopField%`r`n(2秒後自動關閉)
Gui, Show, NoActivate, MD5 Hash ; NoActivate 讓當前活動窗口繼續保持活動狀態.
Sleep, 2000
Gui, Destroy ;關閉GUI
Return
INDIRECT(A1&"!O:O")