Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,572
Default Advance to predetermined cell

You might be interested in an old procedure where using a "named range" will
make the focus in a range of cells move to the next *pre-selected* cell,
following the exact route established at the time of range creation.

Check out this link to an old post:

http://tinyurl.com/39vzv

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

"Publius" wrote in message
...
Thanks. But would you mind taking a look at the code and see if you can
decipher what I'm doing wrong. It does not work at all. THANKS!

Private Sub Worksheet_Change(ByVal Target As Range)

Select Case Target.Address
Case Is = "$B$1"
Range("D31").Select
Case Is = "$D$31"
Range("D33").Select
Case Is = "$D$33"
Range("B38").Select
Case Is = ("$B$38")
Range("C38").Select
Case Is = ("$C$38")
Range("B39").Select
Case Is = ("$C$39")
Range("B40").Select
Case Is = ("$B$40")
Range("C40").Select
Case Is = ("$B$41")
Range("B41").Select
Case Is = "$B$43"
Range ("C43")
Case Else
'ignor anything else
End Select

End Sub

"JLatham" wrote:

Not a worksheet function to do that. But the worksheet_Change() event
was
just made for it! Here's a quick piece of code you can adapt easily,
Make
sure you use the $ symbols in the addresses tested. There are other ways
to
use this event routine to do this kind of thing, but as long as you're
dealing with just a few cells on a sheet this should work ok without
being
too time consuming:

Private Sub Worksheet_Change(ByVal Target As Range)

Select Case Target.Address
Case Is = "$C$12"
Range("B14").Select
Case Is = "$D$12", "$E$12"
Range("G11").Select
Case Else
'ignor anything else
End Select

End Sub

To put the code in the right place, right-click on the sheet's tab and
choose [View Code] then cut and paste this into the code sheet presented
to
you.

"Publius" wrote:

In Excel 2002 I want to insert a command in certain (not all) cells
that once
data is entered therein and "enter" or a hot key is pressed advances
the cell
selection to another specific (specified) cell within the worksheet.
For
example: type "123" in C-1 and pressing "enter" moves the next cell
selection to E-12. Can anyone tell me how to do this?


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,365
Default Advance to predetermined cell

Bookmarked! "old idea" definitely does not make it a bad idea.

"RagDyer" wrote:

You might be interested in an old procedure where using a "named range" will
make the focus in a range of cells move to the next *pre-selected* cell,
following the exact route established at the time of range creation.

Check out this link to an old post:

http://tinyurl.com/39vzv

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

"Publius" wrote in message
...
Thanks. But would you mind taking a look at the code and see if you can
decipher what I'm doing wrong. It does not work at all. THANKS!

Private Sub Worksheet_Change(ByVal Target As Range)

Select Case Target.Address
Case Is = "$B$1"
Range("D31").Select
Case Is = "$D$31"
Range("D33").Select
Case Is = "$D$33"
Range("B38").Select
Case Is = ("$B$38")
Range("C38").Select
Case Is = ("$C$38")
Range("B39").Select
Case Is = ("$C$39")
Range("B40").Select
Case Is = ("$B$40")
Range("C40").Select
Case Is = ("$B$41")
Range("B41").Select
Case Is = "$B$43"
Range ("C43")
Case Else
'ignor anything else
End Select

End Sub

"JLatham" wrote:

Not a worksheet function to do that. But the worksheet_Change() event
was
just made for it! Here's a quick piece of code you can adapt easily,
Make
sure you use the $ symbols in the addresses tested. There are other ways
to
use this event routine to do this kind of thing, but as long as you're
dealing with just a few cells on a sheet this should work ok without
being
too time consuming:

Private Sub Worksheet_Change(ByVal Target As Range)

Select Case Target.Address
Case Is = "$C$12"
Range("B14").Select
Case Is = "$D$12", "$E$12"
Range("G11").Select
Case Else
'ignor anything else
End Select

End Sub

To put the code in the right place, right-click on the sheet's tab and
choose [View Code] then cut and paste this into the code sheet presented
to
you.

"Publius" wrote:

In Excel 2002 I want to insert a command in certain (not all) cells
that once
data is entered therein and "enter" or a hot key is pressed advances
the cell
selection to another specific (specified) cell within the worksheet.
For
example: type "123" in C-1 and pressing "enter" moves the next cell
selection to E-12. Can anyone tell me how to do this?



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
Advance to predetermined cell BoniM Excel Worksheet Functions 2 January 10th 07 01:25 AM
Using an offset formula for the reference in a relative reference Cuda Excel Worksheet Functions 6 November 15th 06 05:12 PM
insert date Larry Excel Worksheet Functions 28 July 15th 06 02:41 AM
Urgent date/scheduling calc needed jct Excel Worksheet Functions 3 February 24th 06 01:36 AM
cell color index comparison MINAL ZUNKE New Users to Excel 1 June 30th 05 07:11 AM


All times are GMT +1. The time now is 10:03 AM.

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"