Select a specific row in named range

  • Thread starter Thread starter BeSmart
  • Start date Start date
B

BeSmart

Hi All
I need to select the second row in a named range ("Overviewfinal") and
insert copied rows so that the named range expands to take the new data.

I tried the following, but got an error??
Could someone tell me what I've done wrong & how I should do this?
....
Sheets("Overview Template").Select
Range("Overviewfinal").Range(Cells(1, 1)).EntireRow.Select
Selection.Insert Shift:=xlDown
.....
Thank for your help
BeSmart
 
after rereading, i think you may want to just insert a row in the range

range("test").rows(2).insert Shift:=xlDown
 
hi
another way...
Range("A20").EntireRow.Copy
Range("Myrange").Resize(1, 1).Offset(1, 0).EntireRow.Insert shift:=xlDown
Range("Myrange").Resize(1, 1).Offset(1, 0).PasteSpecial xlPasteAll

mine may be a little more wordy but it works too.
notice that nothing was selected.
regards
FSt1
 
Hi Gary & FSt1
All of your suggestions worked great!!!
Thank you very much for your help.
I ended up using Gary's third suggestion.
Regards
BeSmart
 
Gary, Perhaps you can help me with another small problem I've posted - but go
no response on...

Where "D" appears below, I need it to look at a range of "D:"BJ" - not just
one column.
Again I've tried to enter a range (including changing the Dim), but I keep
getting an error of type mismatch...

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim Cell As Integer
Dim Z As Integer

For Z = 17 To Cells(Rows.Count, "C").End(xlUp).Row
For Cell = 43 To Cells(Rows.Count, "A").End(xlUp).Row
If Cells(Cell, "A").Value Like "*" & Range("C" & Z).Value & "*" Then
If Cells(Cell, "D").Value > "0" Then
Cells(Cell, "D").Interior.Color = Range("C" & Z).Interior.Color
End If
End If
Next Cell
Next Z
End Sub
 
See my response to your original post

Mike F
BeSmart said:
Gary, Perhaps you can help me with another small problem I've posted - but
go
no response on...

Where "D" appears below, I need it to look at a range of "D:"BJ" - not
just
one column.
Again I've tried to enter a range (including changing the Dim), but I keep
getting an error of type mismatch...

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim Cell As Integer
Dim Z As Integer

For Z = 17 To Cells(Rows.Count, "C").End(xlUp).Row
For Cell = 43 To Cells(Rows.Count, "A").End(xlUp).Row
If Cells(Cell, "A").Value Like "*" & Range("C" & Z).Value & "*" Then
If Cells(Cell, "D").Value > "0" Then
Cells(Cell, "D").Interior.Color = Range("C" & Z).Interior.Color
End If
End If
Next Cell
Next Z
End Sub
 
Back
Top