Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Change a column data without new row?

Hi I currently have this which puts info onto a detention sheet for me when
they get their 1st warning (a 1 in this case). This would denote a 5 minute
detention which I would write in column D of the detentions sheet.

What I would like is that when I move to warning two it automatically
changes the 5 minute to a 15 minute one, and then 30 minute on warning 3. Is
this possible?

Case Empty
Target.Value = "!"
Case "!"
Target.Value = "1"
Sheets("Detentions").Activate
Set rng = Sheets("Detentions").Cells(Rows.Count,
"B").End(xlUp).Offset(1, 0)
rng.Value = Cells(Target.Row, "B").Value 'Fills Name in
Column B
rng.Offset(0, 1).Value = Cells(1, Target.Column).Value
'Fills Date in Column C
rng.Offset(0, -1).Value = Cells(Target.Row, 1).Value 'Fills
Teacher in Column A
Sheets("Behaviour").Activate
Case "1"
Target.Value = "2"
Case "2"
Target.Value = "3"
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default Change a column data without new row?

Where in the code does it put 5 in column D?

--
__________________________________
HTH

Bob

"PG Oriel" wrote in message
...
Hi I currently have this which puts info onto a detention sheet for me
when
they get their 1st warning (a 1 in this case). This would denote a 5
minute
detention which I would write in column D of the detentions sheet.

What I would like is that when I move to warning two it automatically
changes the 5 minute to a 15 minute one, and then 30 minute on warning 3.
Is
this possible?

Case Empty
Target.Value = "!"
Case "!"
Target.Value = "1"
Sheets("Detentions").Activate
Set rng = Sheets("Detentions").Cells(Rows.Count,
"B").End(xlUp).Offset(1, 0)
rng.Value = Cells(Target.Row, "B").Value 'Fills Name in
Column B
rng.Offset(0, 1).Value = Cells(1, Target.Column).Value
'Fills Date in Column C
rng.Offset(0, -1).Value = Cells(Target.Row, 1).Value 'Fills
Teacher in Column A
Sheets("Behaviour").Activate
Case "1"
Target.Value = "2"
Case "2"
Target.Value = "3"



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Change a column data without new row?

It puts it in the row created in the code after Pupil A's "1" gets entered.
It is not always possible to assume that it is still the last row in the
detentions sheet either as another pupil might have received a "1" before
Pupil A gets a "2"

"Bob Phillips" wrote:

Where in the code does it put 5 in column D?

--
__________________________________
HTH

Bob

"PG Oriel" wrote in message
...
Hi I currently have this which puts info onto a detention sheet for me
when
they get their 1st warning (a 1 in this case). This would denote a 5
minute
detention which I would write in column D of the detentions sheet.

What I would like is that when I move to warning two it automatically
changes the 5 minute to a 15 minute one, and then 30 minute on warning 3.
Is
this possible?

Case Empty
Target.Value = "!"
Case "!"
Target.Value = "1"
Sheets("Detentions").Activate
Set rng = Sheets("Detentions").Cells(Rows.Count,
"B").End(xlUp).Offset(1, 0)
rng.Value = Cells(Target.Row, "B").Value 'Fills Name in
Column B
rng.Offset(0, 1).Value = Cells(1, Target.Column).Value
'Fills Date in Column C
rng.Offset(0, -1).Value = Cells(Target.Row, 1).Value 'Fills
Teacher in Column A
Sheets("Behaviour").Activate
Case "1"
Target.Value = "2"
Case "2"
Target.Value = "3"




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
change Data from column b into row based on value in column a CmSant2 Excel Worksheet Functions 1 April 22nd 08 06:49 PM
Find Data and Change A Different Column Jeff Gross Excel Programming 0 March 20th 08 12:46 PM
How do I find a change of data in an excel column ? chriso Excel Discussion (Misc queries) 1 July 11th 06 11:57 AM
How do I change data spacing in a column Manthelan Excel Worksheet Functions 1 November 28th 05 12:52 PM
How do I change data that has been entered in a column to a row? ryoung Excel Discussion (Misc queries) 2 June 23rd 05 07:56 PM


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

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"