Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Exce small program

I have a 3 column spread sheet. The first column is a consistent letter. The
second column is a numerical value inputted by students. The third column is
the =NOW() command.
What I want to happen is after the student inputs their number and hit's
enter, I want the NOW command to execute and the cursor to return the second
column for the next student input.

I know how to have the cursor move from either the next column cell or the
next down cell. In either case the NOW command is a must to execute without
having to rely upon the students input.

Any, any help would be greatly appreciated.

Thank you .
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Exce small program

Right click sheet tabview codeinsert this
Now when you enter something in col b now will be in col c and the macro
asks what to put in col D

Private Sub Worksheet_change(ByVal Target As Range)
If Intersect(Target, Columns("b")) Is Nothing Then Exit Sub
Target.Offset(, 1) = Now()
Target.Offset(, 2) = InputBox("enter more data for col D")
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Texasowl" wrote in message
...
I have a 3 column spread sheet. The first column is a consistent letter.
The
second column is a numerical value inputted by students. The third column
is
the =NOW() command.
What I want to happen is after the student inputs their number and hit's
enter, I want the NOW command to execute and the cursor to return the
second
column for the next student input.

I know how to have the cursor move from either the next column cell or the
next down cell. In either case the NOW command is a must to execute
without
having to rely upon the students input.

Any, any help would be greatly appreciated.

Thank you .


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Exce small program



"Texasowl" wrote:



"Don Guillett" wrote:

Right click sheet tabview codeinsert this
Now when you enter something in col b now will be in col c and the macro
asks what to put in col D

Private Sub Worksheet_change(ByVal Target As Range)
If Intersect(Target, Columns("b")) Is Nothing Then Exit Sub
Target.Offset(, 1) = Now()
Target.Offset(, 2) = InputBox("enter more data for col D")
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Texasowl" wrote in message
...
I have a 3 column spread sheet. The first column is a consistent letter.
The
second column is a numerical value inputted by students. The third column
is
the =NOW() command.
What I want to happen is after the student inputs their number and hit's
enter, I want the NOW command to execute and the cursor to return the
second
column for the next student input.

I know how to have the cursor move from either the next column cell or the
next down cell. In either case the NOW command is a must to execute
without
having to rely upon the students input.

Any, any help would be greatly appreciated.

Thank you .




Don,
Thank you very much for the help. One small problem, instead of the cursor
going back to the "B" column, it is going to "D". Is there a fix for this?

Thanks,

Dan



Don,
I was able to figure out how to make it go to the next line and back into
the "B" column. What I can not do now is to get the program to stop asking
for an input. If I hit either the ok, or the cancel with the input blank, it
enters the NOW and then goes back to the "B" column.
Now I really can use some help on this.

Dan
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Exce small program

Private Sub Worksheet_change(ByVal Target As Range)
If Intersect(Target, Columns("c")) _
Is Nothing Then Exit Sub
Target.Offset(, 1) = Now()
'Target.Offset(, 2) = InputBox("entermoredata")
ans = InputBox("entermoredata")
If ans = "" Then Exit Sub
Target.Offset(1) = ans
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Texasowl" wrote in message
...


"Don Guillett" wrote:

Right click sheet tabview codeinsert this
Now when you enter something in col b now will be in col c and the macro
asks what to put in col D

Private Sub Worksheet_change(ByVal Target As Range)
If Intersect(Target, Columns("b")) Is Nothing Then Exit Sub
Target.Offset(, 1) = Now()
Target.Offset(, 2) = InputBox("enter more data for col D")
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Texasowl" wrote in message
...
I have a 3 column spread sheet. The first column is a consistent letter.
The
second column is a numerical value inputted by students. The third
column
is
the =NOW() command.
What I want to happen is after the student inputs their number and
hit's
enter, I want the NOW command to execute and the cursor to return the
second
column for the next student input.

I know how to have the cursor move from either the next column cell or
the
next down cell. In either case the NOW command is a must to execute
without
having to rely upon the students input.

Any, any help would be greatly appreciated.

Thank you .




Don,
Thank you very much for the help. One small problem, instead of the cursor
going back to the "B" column, it is going to "D". Is there a fix for
this?

Thanks,

Dan




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 220
Default Exce small program

Perhaps this change to Don's code?

Private Sub Worksheet_change(ByVal Target As Range)
Dim inputChk
'
inputChk = Inputbox("Enter more data for Col D")
'
If Intersect(Target, Columns("b")) Is Nothing Then Exit Sub
Target.Offset(, 1) = Now()
If inputChk = "" Then Exit Sub
Target.Offset(, 2) = InputBox("enter more data for col D")
End Sub



"Texasowl" wrote:


Don,
I was able to figure out how to make it go to the next line and back into
the "B" column. What I can not do now is to get the program to stop asking
for an input. If I hit either the ok, or the cancel with the input blank, it
enters the NOW and then goes back to the "B" column.
Now I really can use some help on this.

Dan

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Exce small program



"Don Guillett" wrote:

Private Sub Worksheet_change(ByVal Target As Range)
If Intersect(Target, Columns("c")) _
Is Nothing Then Exit Sub
Target.Offset(, 1) = Now()
'Target.Offset(, 2) = InputBox("entermoredata")
ans = InputBox("entermoredata")
If ans = "" Then Exit Sub
Target.Offset(1) = ans
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Texasowl" wrote in message
...


"Don Guillett" wrote:

Right click sheet tabview codeinsert this
Now when you enter something in col b now will be in col c and the macro
asks what to put in col D

Private Sub Worksheet_change(ByVal Target As Range)
If Intersect(Target, Columns("b")) Is Nothing Then Exit Sub
Target.Offset(, 1) = Now()
Target.Offset(, 2) = InputBox("enter more data for col D")
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Texasowl" wrote in message
...
I have a 3 column spread sheet. The first column is a consistent letter.
The
second column is a numerical value inputted by students. The third
column
is
the =NOW() command.
What I want to happen is after the student inputs their number and
hit's
enter, I want the NOW command to execute and the cursor to return the
second
column for the next student input.

I know how to have the cursor move from either the next column cell or
the
next down cell. In either case the NOW command is a must to execute
without
having to rely upon the students input.

Any, any help would be greatly appreciated.

Thank you .



Don,
Thank you very much for the help. One small problem, instead of the cursor
going back to the "B" column, it is going to "D". Is there a fix for
this?

Thanks,

Dan




Don and Eric,
Thank you both for your help and my apologies for not getting back to you
sooner.

It seems that Don's first input worked and I was just mis-reading what I was
looking at.

What I need to know now is if there is a command that can be used to force
the second column to be nothing more then a numerical input. I checked it by
typing in alpha and it seems that they can also be inputted.

Thanks,

Dan
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Exce small program

try

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Columns("c")) _
Is Nothing Then Exit Sub
Target.Offset(, 1) = Now()
'Target.Offset(, 2) = InputBox("entermoredata")
ans = InputBox("entermoredata")
'If ans = "" Then Exit Sub
If Not IsNumeric(ans) Then Exit Sub
Target.Offset(, 2) = ans
'Target.Offset(1) = ans
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Texasowl" wrote in message
...


"Don Guillett" wrote:

Private Sub Worksheet_change(ByVal Target As Range)
If Intersect(Target, Columns("c")) _
Is Nothing Then Exit Sub
Target.Offset(, 1) = Now()
'Target.Offset(, 2) = InputBox("entermoredata")
ans = InputBox("entermoredata")
If ans = "" Then Exit Sub
Target.Offset(1) = ans
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Texasowl" wrote in message
...


"Don Guillett" wrote:

Right click sheet tabview codeinsert this
Now when you enter something in col b now will be in col c and the
macro
asks what to put in col D

Private Sub Worksheet_change(ByVal Target As Range)
If Intersect(Target, Columns("b")) Is Nothing Then Exit Sub
Target.Offset(, 1) = Now()
Target.Offset(, 2) = InputBox("enter more data for col D")
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Texasowl" wrote in message
...
I have a 3 column spread sheet. The first column is a consistent
letter.
The
second column is a numerical value inputted by students. The third
column
is
the =NOW() command.
What I want to happen is after the student inputs their number and
hit's
enter, I want the NOW command to execute and the cursor to return
the
second
column for the next student input.

I know how to have the cursor move from either the next column cell
or
the
next down cell. In either case the NOW command is a must to execute
without
having to rely upon the students input.

Any, any help would be greatly appreciated.

Thank you .



Don,
Thank you very much for the help. One small problem, instead of the
cursor
going back to the "B" column, it is going to "D". Is there a fix for
this?

Thanks,

Dan




Don and Eric,
Thank you both for your help and my apologies for not getting back to you
sooner.

It seems that Don's first input worked and I was just mis-reading what I
was
looking at.

What I need to know now is if there is a command that can be used to force
the second column to be nothing more then a numerical input. I checked it
by
typing in alpha and it seems that they can also be inputted.

Thanks,

Dan


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
Using the functions "LARGE"and "SMALL" in an Excel program Ed[_30_] Excel Programming 0 March 18th 08 05:14 PM
ISERROR,SMALL,INDEX, MATCH, SMALL?? M.A.Tyler Excel Discussion (Misc queries) 1 May 2nd 07 04:08 AM
Exce Macros LPS Excel Programming 0 June 2nd 06 08:55 PM
How can I make program of accounting in excel for small business Najaf Anwar Excel Programming 1 February 27th 06 02:41 AM
merging excel program with tdc finance program judy Excel Programming 0 November 5th 03 08:01 PM


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