ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Tabbing (https://www.excelbanter.com/excel-discussion-misc-queries/67661-re-tabbing.html)

David McRitchie

Tabbing
 
Hi Danny, (navigation after a change event via macro)
Thanks for sending the worksheet. (reply posted to misc)

Basically you have a table A14:K37 column A contains the time,
columns B, C, E, F, H, and K get filled in if the time is 7:00 (row 20)
or the time is 19:00 (row 33) then additional cells are filled in
after changing entry in Column K (see description at bottom); otherwise,
cell in column B of next row will be selected after entry in column K.

Cells that are to be entered into have a blue font and are unlocked,
which is good shows what people have to enter.

Install Change Event macro by right click on the sheet tab, View code, ...

Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Target.Address(0, 0)
Case "K20" 'time 07:00
Range("N27").Select
Case "K32" 'time 19:00
Range("N28").Select
Case "P27"
Range("M34").Select
Case "P28"
Range("N34").Select
Case "M34"
Range("B21").Select '08:00 next
Case "N34"
Range("B33").Select '20:00 next
Case Else
Select Case Target.Column
Case 3, 6
Target.Offset(0, 2).Select
Case 8
Target.Offset(0, 3).Select
Case 11
Cells(Target.Row + 1, 2).Select
Case Else
Target.Offset(0, 1).Select
End Select
End Select
End Sub

You will not need to use the TAB key, navigation will be
provided after you change value. Tested using F2 then Enter
to effect a change events.

On our sheet, at 07:00, we input information in cells, 20B,20C,20E,20F &
20H. We tab to each cell and all locked cells are skipped. What we would like
to do is, after we put information in cell 20H, we would like to be able to
tab to cells, 27N, 27O, 27P, and 34M and then back to 21B. Is this possible?


similar but different instructions for 19:00 (row 32)
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm





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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com