Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default Select a specific row in named range

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default Select a specific row in named range

or this

range("test").rows(2).entirerow.insert

--


Gary Keramidas
Excel 2003


"BeSmart" wrote in message
...
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default Select a specific row in named range

try this

range("test").rows(2).Select

--


Gary Keramidas
Excel 2003


"BeSmart" wrote in message
...
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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default Select a specific row in named range

after rereading, i think you may want to just insert a row in the range

range("test").rows(2).insert Shift:=xlDown

--


Gary Keramidas
Excel 2003


"BeSmart" wrote in message
...
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


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Select a specific row in named range

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

"BeSmart" wrote:

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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default Select a specific row in named range

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


"FSt1" wrote:

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

"BeSmart" wrote:

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

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default Select a specific row in named range

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
--
Thank for your help
BeSmart


"FSt1" wrote:

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

"BeSmart" wrote:

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

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default Select a specific row in named range

See my response to your original post

Mike F
"BeSmart" wrote in message
...
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
--
Thank for your help
BeSmart


"FSt1" wrote:

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

"BeSmart" wrote:

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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Select Named Range in Worksheet Dee Excel Programming 3 February 28th 09 01:36 AM
how to select ALL named shapes in range Corey Excel Programming 1 August 25th 06 01:14 AM
Compare a selected Range with a Named range and select cells that do not exist PCLIVE Excel Programming 1 October 18th 05 07:09 PM
create named range specific to worksheet [email protected] Excel Programming 2 June 28th 05 04:38 PM
named range not specific to worksheet Mark Kubicki Excel Programming 1 November 26th 03 04:39 PM


All times are GMT +1. The time now is 10:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"