VBA를 사용하여 프로그래밍 방식으로 한 워크 시트의 행을 복사 한 다음 이동 한 후에 어떻게 삭제합니까? 기준에 따라 모든 레코드를 삭제하는 것 같지 않습니다. 검색하고 있습니다.한 워크 시트의 행을 복사 한 다음 이동 한 후 삭제하는 방법은 무엇입니까?
Dim lRowCounter as Long, lTotalRows as Long,sCommPerUnit as String,lExceptionRowCounter as Long
lTotalRows = 10
For lRowCounter = 1 To lTotalRows
'If Row has no mapping, move it to Exceptions Report
sCommPerUnit = Trim(rRange.Offset(lRowCounter, 2))
If (sCommPerUnit = "SOMETHING") Then
lExceptionRowCounter = lExceptionRowCounter + 1
'Move row to Exception Report Worksheet
rExceptionRange.Offset(lExceptionRowCounter, 1) = Trim(rRange.Offset(lRowCounter, Output_Order))
'Delete Row from Report
rRange.Offset(lRowCounter, 1).EntireRow.Delete xlShiftUp
End If
Next
관련
고성
감사합니다. – Kojof