Cell Wrap

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

Is there a way to prevent tabbing past a certain point in a spreadsheet?

For example, if my sheet goes from column A to column N, can I block all
cursur movement beyond column N? I am trying to get it to automatically wrap
back to column A when column N is reached.

Thank you
 
Try this:-

Right click the sheet tab , view code anf paste this in:-

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Selection.Column > 14 Then
Cells(ActiveCell.Row + 1, 1).Select
End If
End Sub

Mike
 
could also try unlocking the cells you want users to access ie Col A -> col N

Select Col A - N - Format/Cells/Protection/uncheck Locked
then Password protect the sheet, and ensure you uncheck Select locked cells

HTH
 
Thanks Mike, it worked but I have no idea why.

If I were to use this same formula in another worksheet, what section of the
below formula would I change to tell excel to wrap at column K or Z?
 
N is the 14th letter of the alphabet, so you would need to change this
line:

If Selection.Column > 14 Then

to suit the column number you want to wrap at.

You could also hide the columns beyond where you want to wrap, to make
it more obvious.

Hope this helps.

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top