For j = 1 To A_4(65536, 1).End(xlUp).Row
If WorksheetFunction.CountIf(AAA, A_4(j, 1)) > 0 Then
y = WorksheetFunction.Match(A_4(j, 1), AAA)
A_4(j, 37).NoteText A_3(y, 2)
End If
Next j
可能這樣就可以
For M = 2 To X
If Sheets("明細").Cells(M, 1) = Sheets("加油紀錄輸入修改").Cells(3, 2) Then
For c2 = 2 To 90 Step 2
Sheets("明細").Cells(M, c2).Resize(, 2) = Sheets("加油紀錄輸入修改").Cells(c2 / 2 + 4, 2).Resize(, 2)
Next
y = y + 1
End If
Next