#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default set macro to a cell

How do I set a macro to go to a specific cell when my cursor hits a specified
cell?When I type down column K2, k3, k4, k5, then hit enter into k6, I want
the cursor to go back to k2.
Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 222
Default set macro to a cell

You don't really need a macro for that. If you highlight cells K2:K6 and then
start typing with them highlighted, your cursor will do what you described.

--
"Actually, I *am* a rocket scientist." -- JB

Your feedback is appreciated, click YES if this post helped you.


"GAME.ON.GFX" wrote:

How do I set a macro to go to a specific cell when my cursor hits a specified
cell?When I type down column K2, k3, k4, k5, then hit enter into k6, I want
the cursor to go back to k2.
Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 222
Default set macro to a cell

Correction, I meant if you highlight cells K2:K5 it will do what you describe.
--
"Actually, I *am* a rocket scientist." -- JB

Your feedback is appreciated, click YES if this post helped you.


"JBeaucaire" wrote:

You don't really need a macro for that. If you highlight cells K2:K6 and then
start typing with them highlighted, your cursor will do what you described.

--
"Actually, I *am* a rocket scientist." -- JB

Your feedback is appreciated, click YES if this post helped you.


"GAME.ON.GFX" wrote:

How do I set a macro to go to a specific cell when my cursor hits a specified
cell?When I type down column K2, k3, k4, k5, then hit enter into k6, I want
the cursor to go back to k2.
Thanks.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,805
Default set macro to a cell

Attach the following to the worksheet you are working on...
Assumption: The cursor goes to K7 when you enter something in K6 and press
Enter...

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$K$7" Then
Range("K2").Activate
End If
End Sub

"GAME.ON.GFX" wrote:

How do I set a macro to go to a specific cell when my cursor hits a specified
cell?When I type down column K2, k3, k4, k5, then hit enter into k6, I want
the cursor to go back to k2.
Thanks.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,805
Default set macro to a cell

I think you needed to go back to K2 after K5. In that case change $k$7 to $K$6.

However JBeaucaire's suggestion is much better.

"Sheeloo" wrote:

Attach the following to the worksheet you are working on...
Assumption: The cursor goes to K7 when you enter something in K6 and press
Enter...

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$K$7" Then
Range("K2").Activate
End If
End Sub

"GAME.ON.GFX" wrote:

How do I set a macro to go to a specific cell when my cursor hits a specified
cell?When I type down column K2, k3, k4, k5, then hit enter into k6, I want
the cursor to go back to k2.
Thanks.



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default set macro to a cell


Here's another way

If you unlock the specified cells, then protect the sheet and "select
Unlocked cells", you will automatically go back to the beginning.


--
Stringer
------------------------------------------------------------------------
Stringer's Profile: http://www.thecodecage.com/forumz/member.php?userid=117
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=65195

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
Macro to transfer contents of 'Selected' cell to alternate cell. Gryndar Excel Worksheet Functions 7 December 20th 08 09:58 PM
'IF' Macro to insert cell contents to alternate cell if cell not e Gryndar Excel Worksheet Functions 6 December 20th 08 05:02 PM
Macro to Insert Current Date into cell - Macro to "Save As" Guy[_2_] Excel Worksheet Functions 4 December 12th 08 08:20 PM
using a cell value to control a counter inside a macro and displaying macro value ocset Excel Worksheet Functions 1 September 10th 06 05:32 AM
Using macro to copy a part of a cell content to next cell Charles Excel Discussion (Misc queries) 6 May 31st 06 05:57 AM


All times are GMT +1. The time now is 12:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"