return key... :: MrExcel Message Board



 FAQFAQ
   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   FavoritesFavorites   StatisticsStatistics 
 RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Online StoreOnline Store

MrExcel Message Board Forum Index -> Excel Questions

return key...
Post new topic   Reply to topic
Last Thread | Next Thread  >   Printable version
  Author    Thread

AndyD
Board Master


Joined: 15 Nov 2002
Posts: 225

Flag: Blank

Status: Offline

 Reply with quote  

return key...

hi
Ive changed my settings so when press return (or enter) excel moves to cell to right instead of down..

ive 2 columns (B & C)...ideally what i would like is something like

enter details in B19, excel moves to right C19, excel then moves to B20, then to C20 etc

is this possible?

cheers all
Andy

Post Fri Sep 19, 2003 2:02 pm 
 View user's profile Send private message

Juan Pablo González
MrExcel MVP


Joined: 09 Feb 2002
Posts: 8580
Location: Marion, IL
Flag: Colombia

Status: Offline

 Reply with quote  

Re: return key...

Select columns B and C, and then, start entering the information.
_________________
Regards,

Juan Pablo González
MrExcel.com Consulting

Read the Articles List and check out our Recommended links and Add-Ins

Post Fri Sep 19, 2003 2:04 pm 
 View user's profile Send private message Visit poster's website

jimboy
Board Master
Board  Master


Joined: 12 Apr 2002
Posts: 1741

Flag: England

Status: Offline

 Reply with quote  

Re: return key...

Right mouse over the sheet name (i.e. Sheet1) and select view code, then paste this in;

code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target.Column = 3 Then Target.Offset(1, -1).Select

End Sub


Post Fri Sep 19, 2003 2:06 pm 
 View user's profile Send private message

AndyD
Board Master


Joined: 15 Nov 2002
Posts: 225

Flag: Blank

Status: Offline

 Reply with quote  

Re: return key...

Hi Jimboy
thanks for this...sorry am being a bit thick i think..ive done as you suggested but it doesnot seem to work...pressing enter, or return just moves cells to right each time...

any ideas for me?
thanks
Andy

Post Fri Sep 19, 2003 2:26 pm 
 View user's profile Send private message

jimboy
Board Master
Board  Master


Joined: 12 Apr 2002
Posts: 1741

Flag: England

Status: Offline

 Reply with quote  

Re: return key...

It will work when you change a cell in column C, if you what it to run when you change selection use this;

code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target.Column = 4 Then Target.Offset(1, -2).Select

End Sub




Last edited by jimboy on Fri Sep 19, 2003 2:30 pm; edited 2 times in total

Post Fri Sep 19, 2003 2:28 pm 
 View user's profile Send private message

Juan Pablo González
MrExcel MVP


Joined: 09 Feb 2002
Posts: 8580
Location: Marion, IL
Flag: Colombia

Status: Offline

 Reply with quote  

Re: return key...

Did you try what I suggested ??
_________________
Regards,

Juan Pablo González
MrExcel.com Consulting

Read the Articles List and check out our Recommended links and Add-Ins

Post Fri Sep 19, 2003 2:28 pm 
 View user's profile Send private message Visit poster's website

AndyD
Board Master


Joined: 15 Nov 2002
Posts: 225

Flag: Blank

Status: Offline

 Reply with quote  

Re: return key...

i did but i didnt put info in (Doh!) just pressed enter....
thanks again, have great w/e
Andy

Post Fri Sep 19, 2003 2:34 pm 
 View user's profile Send private message

Chitosunday
Board Master


Joined: 14 Jul 2003
Posts: 423

Flag: Philippines

Status: Offline

 Reply with quote  

Private Sub Worksheet_Change(ByVal Target As Range)
If ActiveCell.Column >= 4 Then
Cells(ActiveCell.Row + 1, 2).Select
end if
End Sub
_________________
Mr Young at Heart - Learning is like chasing the wind, it's boundless.

Post Fri Sep 19, 2003 2:51 pm 
 View user's profile Send private message Send e-mail MSN Messenger
  Display posts from previous:      

MrExcel Message Board Forum Index -> Excel Questions


Forum Jump:
Jump to:  

Post new topic   Reply to topic
Page 1 of 1



Add To Favorites

 


Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB: 2.0.4 © 2001 phpBB Group

Need help posting your first question? Read how to post

Need extra help ? Couldn't get the answer you needed ? Get a free quote from our Consulting Team

Download Colo's HTML Maker utility for displaying your Excel Worksheet on the board.

Download VB HTML Maker to post your code on the board


Check out our new index to 485 Excel Articles.


Return to MrExcel Consulting

All contents Copyright 1998-2004 by MrExcel.com
If you believe information posted here is from your copyrighted source, notify us per the Terms of Use
Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.