#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 164
Default Hard Return

Currently have Excel set, so that whenever I press Enter I go to the next cell to the right. Is there a way to set it up so that when you reach the end of a data range i.e column G for example, that when you hit enter you return to Column A in the next Row. Like a Hard Return.

--

Regards
Michael Koerner


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Hard Return


Michael Koerner;345900 Wrote:
Currently have Excel set, so that whenever I press Enter I go to the
next cell to the right. Is there a way to set it up so that when you
reach the end of a data range i.e column G for example, that when you
hit enter you return to Column A in the next Row. Like a Hard Return.

--

Regards
Michael KoernerMicheal, assuming you have already set the cursor to move right on enter

in TOOLSOPTIONSEDIT, then right click your worksheet tab and choose
VIEW CODE and paste this in:

Code:
--------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column < 8 Then Exit Sub
If Target.Column = 8 Then
Target.Offset(1, -7).Select
End If
End Sub
--------------------


--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=96775

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default Hard Return

Michael

Put this little macro in the sheet module of your sheet. To access that module, right-click on the sheet tab, select View Code. Paste this macro into that module. "X" out of the module to return to your sheet. This macro will select the cell in the next row in Column A if any change occurs to the contents of any cell in Column G (column # 7). HTH Otto

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Count 1 Then Exit Sub

If Target.Column = 7 Then

Cells(Target.Row + 1, 1).Select

End If

End Sub

"Michael Koerner" wrote in message ...
Currently have Excel set, so that whenever I press Enter I go to the next cell to the right. Is there a way to set it up so that when you reach the end of a data range i.e column G for example, that when you hit enter you return to Column A in the next Row. Like a Hard Return.

--

Regards
Michael Koerner


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 164
Default Hard Return

Thanks to all, works just great.

--

Regards
Michael Koerner


"Michael Koerner" wrote in message
...
Currently have Excel set, so that whenever I press Enter I go to the next
cell to the right. Is there a way to set it up so that when you reach the
end of a data range i.e column G for example, that when you hit enter you
return to Column A in the next Row. Like a Hard Return.

--

Regards
Michael Koerner



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
Hard return ttribble Excel Worksheet Functions 4 June 19th 07 04:33 AM
use a hard return in a text box clara Excel Programming 2 March 19th 07 07:19 PM
how to replace a hard return? go1angel Excel Programming 1 July 22nd 05 07:51 PM
hard return alphadog47 New Users to Excel 2 February 26th 05 08:38 PM
Remove Hard Return Stephen[_13_] Excel Programming 4 May 3rd 04 08:10 PM


All times are GMT +1. The time now is 02:55 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"