keithkemble
Board Regular
- Joined
- Feb 15, 2002
- Messages
- 160
This procedure works ( Thanks to help from Barrie Davidson)
I now want to add two further cell selections to the main range selection
Adding the two cells with in the range by bracketing or using the , only appear to cause the selection to become the first cell in range to the last cell in range
Any help would be appreciated
I have ' the section requiring help
Sub cmr()
Dim i
i = 15
' To select condition c in column e then place in sheet cmr at A15
Sheets("mobile").Select
Range("e15").Select
For Each X In Range("E15", Range("E16").End(xlDown))
If X = "" Then Exit For
If UCase(ActiveCell.Value) = "C" Then
Sheets("mobile").Activate
Range("A" & i).Select
Range("A" & i & ":H" & i).Select ' This is where I want add ("y" & i) plus ("CF" & i)
Selection.Copy
Sheets("cmr").Select
Range("A15").Select
Sheets("cmr").Select
Range("A2000").End(xlUp).Offset(1, 0).PasteSpecial Paste:=xlValues
Sheets("mobile").Select
i = Selection.Row + 1
ElseIf UCase(Activecel.Value) <> "C" Then
i = Selection.Row + 1
Range ("E" & i)
End If
Next
Sheets("mobile").Select
Range("E15").Select
End Sub
I now want to add two further cell selections to the main range selection
Adding the two cells with in the range by bracketing or using the , only appear to cause the selection to become the first cell in range to the last cell in range
Any help would be appreciated
I have ' the section requiring help
Sub cmr()
Dim i
i = 15
' To select condition c in column e then place in sheet cmr at A15
Sheets("mobile").Select
Range("e15").Select
For Each X In Range("E15", Range("E16").End(xlDown))
If X = "" Then Exit For
If UCase(ActiveCell.Value) = "C" Then
Sheets("mobile").Activate
Range("A" & i).Select
Range("A" & i & ":H" & i).Select ' This is where I want add ("y" & i) plus ("CF" & i)
Selection.Copy
Sheets("cmr").Select
Range("A15").Select
Sheets("cmr").Select
Range("A2000").End(xlUp).Offset(1, 0).PasteSpecial Paste:=xlValues
Sheets("mobile").Select
i = Selection.Row + 1
ElseIf UCase(Activecel.Value) <> "C" Then
i = Selection.Row + 1
Range ("E" & i)
End If
Next
Sheets("mobile").Select
Range("E15").Select
End Sub