leosmessi786
New Member
- Joined
- Oct 18, 2021
- Messages
- 9
- Office Version
- 365
- Platform
- Windows
So Basically I'm going through column C. For all cells that satisfy that if statement I want to add them to the Port Range. Then at the end of the code I want to paste all those cells together into another cell. Can't wrap my head around on how to add the cells to the range however. IF someone could please help me that would be awesome!!!!
Dim x As Integer
Dim nFirstSectionStartRow As Integer
Dim nFirstSectionRows As Integer
Dim Port As Range
x = 0
nFirstSectionRows = Range("C10", Range("C10").End(xlDown)).Rows.Count
nFirstSectionStartRow = 9
For x = nFirstSectionStartRow + 1 To nFirstSectionStartRow + nFirstSectionRows
If Cells(x, 3).Value + 10 < Cells(x + 1, 3).Value Then
?????Confused as to what I do here
End If
x = x + 1
Next x
Dim x As Integer
Dim nFirstSectionStartRow As Integer
Dim nFirstSectionRows As Integer
Dim Port As Range
x = 0
nFirstSectionRows = Range("C10", Range("C10").End(xlDown)).Rows.Count
nFirstSectionStartRow = 9
For x = nFirstSectionStartRow + 1 To nFirstSectionStartRow + nFirstSectionRows
If Cells(x, 3).Value + 10 < Cells(x + 1, 3).Value Then
?????Confused as to what I do here
End If
x = x + 1
Next x