Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Advance to predetermined cell | Excel Worksheet Functions | |||
Using an offset formula for the reference in a relative reference | Excel Worksheet Functions | |||
insert date | Excel Worksheet Functions | |||
Urgent date/scheduling calc needed | Excel Worksheet Functions | |||
cell color index comparison | New Users to Excel |