Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Go To a Named Range (2nd posting)

I posted my question about three weeks ago. I have several views but nobody informed me if it is possible or not.

I have several named ranges in my worksheet. If I go to one, is it possible that when it goes to that named range, the named range will be positioned at the upper left part of the worksheet (in a blank worksheet the named range would be at A1).

Thanks
  #3   Report Post  
Junior Member
 
Posts: 20
Default

Quote:
Originally Posted by View Post
I posted my question about three weeks ago. I have several views but nobody informed me if it is possible or not.

I have several named ranges in my worksheet. If I go to one, is it possible that when it goes to that named range, the named range will be positioned at the upper left part of the worksheet (in a blank worksheet the named range would be at A1).

Thanks
Sorry but post is unclear. What are you trying to do? Are you trying to record what named range was selected in cell A1 of a blank spreadhseet was once you have gone to the named range?
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 168
Default Go To a Named Range (2nd posting)

On Sunday, February 24, 2013 11:11:21 AM UTC-8, wrote:
I posted my question about three weeks ago. I have several views but nobody informed me if it is possible or not.



I have several named ranges in my worksheet. If I go to one, is it possible that when it goes to that named range, the named range will be positioned at the upper left part of the worksheet (in a blank worksheet the named range would be at A1).



Thanks


Maybe this modified code by Chip Pearson will do the trick for you.
I entered all the names of my named ranges in a data valadation
drop down in F1.

Select a name from F1 and run the Sub LHK().

Option Explicit
Sub LHK()
Dim i As String
i = Range("F1").Value
CenterOnCell Range(i)
End Sub

Sub CenterOnCell(OnCell As Range)

Dim VisRows As Integer
Dim VisCols As Integer

Application.ScreenUpdating = False

OnCell.Parent.Parent.Activate
OnCell.Parent.Activate

With ActiveWindow.VisibleRange
VisRows = .Rows.Count
VisCols = .Columns.Count
End With

Application.Goto OnCell, Scroll:=True
OnCell.Select
Application.ScreenUpdating = True

End Sub

Regards,
Howard


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Go To a Named Range (2nd posting)

On Monday, February 25, 2013 8:32:46 AM UTC-8, wrote:
On Sunday, February 24, 2013 11:11:21 AM UTC-8, wrote:

I posted my question about three weeks ago. I have several views but nobody informed me if it is possible or not.








I have several named ranges in my worksheet. If I go to one, is it possible that when it goes to that named range, the named range will be positioned at the upper left part of the worksheet (in a blank worksheet the named range would be at A1).








Thanks




Maybe this modified code by Chip Pearson will do the trick for you.

I entered all the names of my named ranges in a data valadation

drop down in F1.



Select a name from F1 and run the Sub LHK().



Option Explicit

Sub LHK()

Dim i As String

i = Range("F1").Value

CenterOnCell Range(i)

End Sub



Sub CenterOnCell(OnCell As Range)



Dim VisRows As Integer

Dim VisCols As Integer



Application.ScreenUpdating = False



OnCell.Parent.Parent.Activate

OnCell.Parent.Activate



With ActiveWindow.VisibleRange

VisRows = .Rows.Count

VisCols = .Columns.Count

End With



Application.Goto OnCell, Scroll:=True

OnCell.Select

Application.ScreenUpdating = True



End Sub



Regards,

Howard


Thanks Howard and to everybody that replied. I thought that were was an easier way to do it instead of a macro. When I go to a range, I'll just scroll down to it.

Thanks again

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
Delete Named rnage and Add Named Range ryguy7272 Excel Programming 5 February 5th 10 10:15 AM
Selecting a named range, the name of the named range is in a cell Luc[_8_] Excel Programming 6 January 13th 10 07:35 PM
inserting a named range into new cells based on a named cell Peter S. Excel Discussion (Misc queries) 1 June 4th 06 03:53 AM
If any cell in named range = 8 then shade named range JJ[_8_] Excel Programming 3 August 26th 05 11:09 PM
the owner of posting should be able to delete the posting Mahendra Excel Discussion (Misc queries) 7 August 8th 05 07:21 PM


All times are GMT +1. The time now is 08:15 PM.

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

About Us

"It's about Microsoft Excel"