以下のコードを使用して、あるシートから別のシートに列をコピーし、空白のセルを Null 値に置き換えました。
'Copying If Employee
sourceSheet.Activate
Range(Cells(2, 7), Cells(Rows.Count, 7).End(xlUp)).Select
Selection.Copy
destSheet.Activate
Range("E2", Cells(Rows.Count, 7)).PasteSpecial
For Each cell In Range("E2", Cells(Rows.Count, 5))
If Len(cell.Value) = 0 Then
cell.Value = "No"
End If
for ステートメントを置き換えると、Range("E2", Cells(500,5))
正常に動作します。
何が問題なのですか?私は理解できませんでした。誰でもこれで私を助けることができますか?