Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Basic newbie question

I have a setup of a manually entered grid of data with 40 rows and 12
columns. Each week I need to update Row1 Col1, move to Col 10 and enter
some data, then on to Row2 Col1 ... Col10, etc...

I would like to code the following...
After data is entered in Row1 Col1, move to Row1 Col10, after data is
entered in Row1 Col10, move to Row2 Col1, etc..

What code would do that for me? I think if I could see the code to do one
iteration, I can figure out how to loop it for 40 rows.

Thanks in advance,
John


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 120
Default Basic newbie question

As long as you are actually changing something in each cell then you
could place this macro into your Worksheet under "Tools-Macros-VB
Editor"

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 10 Then
Target.Offset(1, 1).Select
ElseIf Target.Column = 11 Then
Target.Offset(0, -1).Select
End If
End Sub

If it's a systematic change that is doen every day, you could automate
it.

Cheers,
Jason Lepack
On Jan 26, 4:46 pm, "John" wrote:
I have a setup of a manually entered grid of data with 40 rows and 12
columns. Each week I need to update Row1 Col1, move to Col 10 and enter
some data, then on to Row2 Col1 ... Col10, etc...

I would like to code the following...
After data is entered in Row1 Col1, move to Row1 Col10, after data is
entered in Row1 Col10, move to Row2 Col1, etc..

What code would do that for me? I think if I could see the code to do one
iteration, I can figure out how to loop it for 40 rows.

Thanks in advance,
John


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Basic newbie question

Jason,
OK... that's just what I need. I have two other tables of data on that
worksheet that require different "shifting" schemes, but now I know I can
ask where the cursor is and move accordingly. Just what I neeed... a
start...
I'm thinking I may be able to interrogate what "Range" I'm in as well as
what column.

Thanks Jason,
John

"Jason Lepack" wrote in message
ups.com...
As long as you are actually changing something in each cell then you
could place this macro into your Worksheet under "Tools-Macros-VB
Editor"

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 10 Then
Target.Offset(1, 1).Select
ElseIf Target.Column = 11 Then
Target.Offset(0, -1).Select
End If
End Sub

If it's a systematic change that is doen every day, you could automate
it.

Cheers,
Jason Lepack
On Jan 26, 4:46 pm, "John" wrote:
I have a setup of a manually entered grid of data with 40 rows and 12
columns. Each week I need to update Row1 Col1, move to Col 10 and enter
some data, then on to Row2 Col1 ... Col10, etc...

I would like to code the following...
After data is entered in Row1 Col1, move to Row1 Col10, after data is
entered in Row1 Col10, move to Row2 Col1, etc..

What code would do that for me? I think if I could see the code to do
one
iteration, I can figure out how to loop it for 40 rows.

Thanks in advance,
John




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 120
Default Basic newbie question

You can use Target.Row in the same fashion.

Target.Address will give you the address of the cell in the form "$A$1"

Cheers,
Jason Lepack

On Jan 26, 5:51 pm, "John" wrote:
Jason,
OK... that's just what I need. I have two other tables of data on that
worksheet that require different "shifting" schemes, but now I know I can
ask where the cursor is and move accordingly. Just what I neeed... a
start...
I'm thinking I may be able to interrogate what "Range" I'm in as well as
what column.

Thanks Jason,
John

"Jason Lepack" wrote in oglegroups.com...

As long as you are actually changing something in each cell then you
could place this macro into your Worksheet under "Tools-Macros-VB
Editor"


Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 10 Then
Target.Offset(1, 1).Select
ElseIf Target.Column = 11 Then
Target.Offset(0, -1).Select
End If
End Sub


If it's a systematic change that is doen every day, you could automate
it.


Cheers,
Jason Lepack
On Jan 26, 4:46 pm, "John" wrote:
I have a setup of a manually entered grid of data with 40 rows and 12
columns. Each week I need to update Row1 Col1, move to Col 10 and enter
some data, then on to Row2 Col1 ... Col10, etc...


I would like to code the following...
After data is entered in Row1 Col1, move to Row1 Col10, after data is
entered in Row1 Col10, move to Row2 Col1, etc..


What code would do that for me? I think if I could see the code to do
one
iteration, I can figure out how to loop it for 40 rows.


Thanks in advance,
John


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Basic newbie question

Thanks Jason,
I'm digging in there as we speak...
John

"Jason Lepack" wrote in message
ups.com...
You can use Target.Row in the same fashion.

Target.Address will give you the address of the cell in the form "$A$1"

Cheers,
Jason Lepack

On Jan 26, 5:51 pm, "John" wrote:
Jason,
OK... that's just what I need. I have two other tables of data on
that
worksheet that require different "shifting" schemes, but now I know I can
ask where the cursor is and move accordingly. Just what I neeed... a
start...
I'm thinking I may be able to interrogate what "Range" I'm in as well
as
what column.

Thanks Jason,
John

"Jason Lepack" wrote in
oglegroups.com...

As long as you are actually changing something in each cell then you
could place this macro into your Worksheet under "Tools-Macros-VB
Editor"


Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 10 Then
Target.Offset(1, 1).Select
ElseIf Target.Column = 11 Then
Target.Offset(0, -1).Select
End If
End Sub


If it's a systematic change that is doen every day, you could automate
it.


Cheers,
Jason Lepack
On Jan 26, 4:46 pm, "John" wrote:
I have a setup of a manually entered grid of data with 40 rows and 12
columns. Each week I need to update Row1 Col1, move to Col 10 and
enter
some data, then on to Row2 Col1 ... Col10, etc...


I would like to code the following...
After data is entered in Row1 Col1, move to Row1 Col10, after data is
entered in Row1 Col10, move to Row2 Col1, etc..


What code would do that for me? I think if I could see the code to do
one
iteration, I can figure out how to loop it for 40 rows.


Thanks in advance,
John




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
Newbie question golfinray Excel Discussion (Misc queries) 0 April 23rd 09 09:28 PM
Real Newbie newbie question Dave New Users to Excel 0 January 10th 07 07:55 PM
Newbie and Excel 2007 basic question light Excel Programming 2 August 10th 06 03:33 PM
Newbie question Christmas May[_2_] Excel Programming 1 June 8th 06 11:53 AM
Newbie Question - Subtraction Formula Question [email protected] Excel Discussion (Misc queries) 3 May 5th 06 05:50 PM


All times are GMT +1. The time now is 11:11 AM.

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"