Adrian Low
New Member
- Joined
- Apr 30, 2019
- Messages
- 23
Hi, I am trying to detect blank cells in the column and delete the cell away such that my other values can copy to the rest of the next cell.
Here are the codes that I've tried:
Dim wsInput As Worksheet, wsOutput As Worksheet, LastRow As Long, C As Range, D As Range, A As Range, B As Range, V As Range, Z As Range
Set wsInput = Workbooks("InputB.xls").Worksheets("HC_MODULAR_BOARD_20180112")
Set wsOutput = Workbooks("Output.xls").Worksheets("Sheet1")
Set Ws2 = Workbooks("InputA.xls").Worksheets("Sheet0")
With wsInput
LastRow = .Cells(.Rows.Count, "E").End(xlUp).Row
For Each C In .Range("F3:F" & LastRow)
If Len(C.Offset(0, 1).Value <> "") Then
wsOutput.Cells(C.Row, "I").Value = C & "" & C.Offset(0, 1)
Else
Rows(C).Delete
End If
Next C
Here are the codes that I've tried:
Dim wsInput As Worksheet, wsOutput As Worksheet, LastRow As Long, C As Range, D As Range, A As Range, B As Range, V As Range, Z As Range
Set wsInput = Workbooks("InputB.xls").Worksheets("HC_MODULAR_BOARD_20180112")
Set wsOutput = Workbooks("Output.xls").Worksheets("Sheet1")
Set Ws2 = Workbooks("InputA.xls").Worksheets("Sheet0")
With wsInput
LastRow = .Cells(.Rows.Count, "E").End(xlUp).Row
For Each C In .Range("F3:F" & LastRow)
If Len(C.Offset(0, 1).Value <> "") Then
wsOutput.Cells(C.Row, "I").Value = C & "" & C.Offset(0, 1)
Else
Rows(C).Delete
End If
Next C