Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Help for Excel time format "MACRO"

Hi,
Hutch

Thanks for that,But my problem is, whatever i wrote in below was an example
i do not key only "Y" in column "I", i need to key different file name such
as(MARNOK_CHAREO_2_000233), and each and every file are different from each
other.
so now it does't show any time in column "F" when i key/paste the above
file, also it is same for Column "K" i do not key only "Z" in that column.
I would be thankful if u help me with this as well.
--
vijay


"Tom Hutchins" wrote:

Right-click on the sheet tab of your worksheet and select 'View Code'. This
opens the Visual basic Editor (VBE). Paste the following code in the big
blank window:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row < 6 Then Exit Sub
Select Case Target.Column
Case 9: 'column I
If UCase(Left(Target.Value, 1)) = "Y" Then
Cells(Target.Row, 6).Value = Time
End If
Case 11: 'column K
If UCase(Left(Target.Value, 1)) = "Z" Then
Cells(Target.Row, 7).Value = Time
End If
End Select
End Sub

Select File Save, then File Close to close the VBE and return to
normal Excel. The time will be stamped in column F on the same row when you
enter anything beginning with Y in column I. The time will be stamped in
column G on the same row when you enter anything beginning with Z in column K.

If you are new to macros, this link to Jon Peltier's site may be helpful:
http://peltiertech.com/WordPress/200...e-elses-macro/

Hope this helps,

Hutch

"vijay" wrote:

i am working with a organisation.where i need to work on a Excel Sheet daily.
It would be helpful if you get me done this, as it would save my lot of time
and would decrease my work load.
Problem as follow. Version (Excel 2003)
A B C D E F G H I J K L M N
1 I don't want macro to work on first 5 rows
2 I don't want macro to work on first 5 rows
3 I don't want macro to work on first 5 rows
4 I don't want macro to work on first 5 rows
5 I don't want macro to work on first 5 rows
6 A B C D E F G H I J K L M N
7 ST ET Y Z
8 ST ET Y Z
9 ST ET Y Z

The above A,B,C, are the Column, and to the right side rows with numbers.
Daily i do no. of file, which needs to be update in the Excel.
In column "F7" i have keyed "ST" that is equal to start time, before
starting with each new file i need to key the Start time in column "F", and
after completion of that file i need to key end time in column "G". In Column
"G7" ED stands for end time. Rest of the column are having other details that
i need to fill in.
Daily i do huge no. of files, for which i need to key the time everynow and
then.
What i want is whenever i Key "Y"=(file name) in column "I7" the cell in
"F7" should automatically pickup the current time of the system as "Start
Time". And after completing of that file, when i key "Z"=(file name) in
column "K7" the cell in "G7" should automatically pickup the current time of
the system as "End Time".
I don't want to use shortcut keys for the current time every time.
It would be helpful if you get MACRO written for me on this.

--
vijay

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,069
Default Help for Excel time format "MACRO"

Okay, try this code instead:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row < 6 Then Exit Sub
Select Case Target.Column
Case 9: 'column I
If Len(Target.Value) 0 Then
Cells(Target.Row, 6).Value = Time
End If
Case 11: 'column K
If Len(Target.Value) 0 Then
Cells(Target.Row, 7).Value = Time
End If
End Select
End Sub

This will put the current time in F or G when you enter anything in I or K.

Hope this helps,

Hutch

"vijay" wrote:

Hi,
Hutch

Thanks for that,But my problem is, whatever i wrote in below was an example
i do not key only "Y" in column "I", i need to key different file name such
as(MARNOK_CHAREO_2_000233), and each and every file are different from each
other.
so now it does't show any time in column "F" when i key/paste the above
file, also it is same for Column "K" i do not key only "Z" in that column.
I would be thankful if u help me with this as well.
--
vijay


"Tom Hutchins" wrote:

Right-click on the sheet tab of your worksheet and select 'View Code'. This
opens the Visual basic Editor (VBE). Paste the following code in the big
blank window:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row < 6 Then Exit Sub
Select Case Target.Column
Case 9: 'column I
If UCase(Left(Target.Value, 1)) = "Y" Then
Cells(Target.Row, 6).Value = Time
End If
Case 11: 'column K
If UCase(Left(Target.Value, 1)) = "Z" Then
Cells(Target.Row, 7).Value = Time
End If
End Select
End Sub

Select File Save, then File Close to close the VBE and return to
normal Excel. The time will be stamped in column F on the same row when you
enter anything beginning with Y in column I. The time will be stamped in
column G on the same row when you enter anything beginning with Z in column K.

If you are new to macros, this link to Jon Peltier's site may be helpful:
http://peltiertech.com/WordPress/200...e-elses-macro/

Hope this helps,

Hutch

"vijay" wrote:

i am working with a organisation.where i need to work on a Excel Sheet daily.
It would be helpful if you get me done this, as it would save my lot of time
and would decrease my work load.
Problem as follow. Version (Excel 2003)
A B C D E F G H I J K L M N
1 I don't want macro to work on first 5 rows
2 I don't want macro to work on first 5 rows
3 I don't want macro to work on first 5 rows
4 I don't want macro to work on first 5 rows
5 I don't want macro to work on first 5 rows
6 A B C D E F G H I J K L M N
7 ST ET Y Z
8 ST ET Y Z
9 ST ET Y Z

The above A,B,C, are the Column, and to the right side rows with numbers.
Daily i do no. of file, which needs to be update in the Excel.
In column "F7" i have keyed "ST" that is equal to start time, before
starting with each new file i need to key the Start time in column "F", and
after completion of that file i need to key end time in column "G". In Column
"G7" ED stands for end time. Rest of the column are having other details that
i need to fill in.
Daily i do huge no. of files, for which i need to key the time everynow and
then.
What i want is whenever i Key "Y"=(file name) in column "I7" the cell in
"F7" should automatically pickup the current time of the system as "Start
Time". And after completing of that file, when i key "Z"=(file name) in
column "K7" the cell in "G7" should automatically pickup the current time of
the system as "End Time".
I don't want to use shortcut keys for the current time every time.
It would be helpful if you get MACRO written for me on this.

--
vijay

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Help for Excel time format "MACRO"

Hutch,

Thanks for that Tom. It would really save lot of my time. Frankly speaking i
don't no anything about MACRO, but i am very much interested to learn it .
Can u suggest me on that what is the book that i need to refer. Anyway now i
am asking more from u. But really thanks again for your help.
--
vijay


"Tom Hutchins" wrote:

Okay, try this code instead:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row < 6 Then Exit Sub
Select Case Target.Column
Case 9: 'column I
If Len(Target.Value) 0 Then
Cells(Target.Row, 6).Value = Time
End If
Case 11: 'column K
If Len(Target.Value) 0 Then
Cells(Target.Row, 7).Value = Time
End If
End Select
End Sub

This will put the current time in F or G when you enter anything in I or K.

Hope this helps,

Hutch

"vijay" wrote:

Hi,
Hutch

Thanks for that,But my problem is, whatever i wrote in below was an example
i do not key only "Y" in column "I", i need to key different file name such
as(MARNOK_CHAREO_2_000233), and each and every file are different from each
other.
so now it does't show any time in column "F" when i key/paste the above
file, also it is same for Column "K" i do not key only "Z" in that column.
I would be thankful if u help me with this as well.
--
vijay


"Tom Hutchins" wrote:

Right-click on the sheet tab of your worksheet and select 'View Code'. This
opens the Visual basic Editor (VBE). Paste the following code in the big
blank window:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row < 6 Then Exit Sub
Select Case Target.Column
Case 9: 'column I
If UCase(Left(Target.Value, 1)) = "Y" Then
Cells(Target.Row, 6).Value = Time
End If
Case 11: 'column K
If UCase(Left(Target.Value, 1)) = "Z" Then
Cells(Target.Row, 7).Value = Time
End If
End Select
End Sub

Select File Save, then File Close to close the VBE and return to
normal Excel. The time will be stamped in column F on the same row when you
enter anything beginning with Y in column I. The time will be stamped in
column G on the same row when you enter anything beginning with Z in column K.

If you are new to macros, this link to Jon Peltier's site may be helpful:
http://peltiertech.com/WordPress/200...e-elses-macro/

Hope this helps,

Hutch

"vijay" wrote:

i am working with a organisation.where i need to work on a Excel Sheet daily.
It would be helpful if you get me done this, as it would save my lot of time
and would decrease my work load.
Problem as follow. Version (Excel 2003)
A B C D E F G H I J K L M N
1 I don't want macro to work on first 5 rows
2 I don't want macro to work on first 5 rows
3 I don't want macro to work on first 5 rows
4 I don't want macro to work on first 5 rows
5 I don't want macro to work on first 5 rows
6 A B C D E F G H I J K L M N
7 ST ET Y Z
8 ST ET Y Z
9 ST ET Y Z

The above A,B,C, are the Column, and to the right side rows with numbers.
Daily i do no. of file, which needs to be update in the Excel.
In column "F7" i have keyed "ST" that is equal to start time, before
starting with each new file i need to key the Start time in column "F", and
after completion of that file i need to key end time in column "G". In Column
"G7" ED stands for end time. Rest of the column are having other details that
i need to fill in.
Daily i do huge no. of files, for which i need to key the time everynow and
then.
What i want is whenever i Key "Y"=(file name) in column "I7" the cell in
"F7" should automatically pickup the current time of the system as "Start
Time". And after completing of that file, when i key "Z"=(file name) in
column "K7" the cell in "G7" should automatically pickup the current time of
the system as "End Time".
I don't want to use shortcut keys for the current time every time.
It would be helpful if you get MACRO written for me on this.

--
vijay

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,069
Default Help for Excel time format "MACRO"

Debra Dalgleish has a list of books at her site:
http://www.contextures.com/xlbooks.html

John Walkenbach's book "Excel 2003 Power Programming with VBA" is very good.

There are great online resources also for learning VBA. Here are a few:
www.cpearson.com/excel.htm
www.rondebruin.nl/
www.xldynamic.com/source/xld.html
www.contextures.com/
www.dicks-blog.com
www.mcgimpsey.com/

and don't forget http://www.mvps.org/dmcritchie/excel/getstarted.htm

or the link I gave you already:
http://peltiertech.com/WordPress/200...e-elses-macro/

Hope this helps,

Hutch

"vijay" wrote:

Hutch,

Thanks for that Tom. It would really save lot of my time. Frankly speaking i
don't no anything about MACRO, but i am very much interested to learn it .
Can u suggest me on that what is the book that i need to refer. Anyway now i
am asking more from u. But really thanks again for your help.
--
vijay


"Tom Hutchins" wrote:

Okay, try this code instead:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row < 6 Then Exit Sub
Select Case Target.Column
Case 9: 'column I
If Len(Target.Value) 0 Then
Cells(Target.Row, 6).Value = Time
End If
Case 11: 'column K
If Len(Target.Value) 0 Then
Cells(Target.Row, 7).Value = Time
End If
End Select
End Sub

This will put the current time in F or G when you enter anything in I or K.

Hope this helps,

Hutch

"vijay" wrote:

Hi,
Hutch

Thanks for that,But my problem is, whatever i wrote in below was an example
i do not key only "Y" in column "I", i need to key different file name such
as(MARNOK_CHAREO_2_000233), and each and every file are different from each
other.
so now it does't show any time in column "F" when i key/paste the above
file, also it is same for Column "K" i do not key only "Z" in that column.
I would be thankful if u help me with this as well.
--
vijay


"Tom Hutchins" wrote:

Right-click on the sheet tab of your worksheet and select 'View Code'. This
opens the Visual basic Editor (VBE). Paste the following code in the big
blank window:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row < 6 Then Exit Sub
Select Case Target.Column
Case 9: 'column I
If UCase(Left(Target.Value, 1)) = "Y" Then
Cells(Target.Row, 6).Value = Time
End If
Case 11: 'column K
If UCase(Left(Target.Value, 1)) = "Z" Then
Cells(Target.Row, 7).Value = Time
End If
End Select
End Sub

Select File Save, then File Close to close the VBE and return to
normal Excel. The time will be stamped in column F on the same row when you
enter anything beginning with Y in column I. The time will be stamped in
column G on the same row when you enter anything beginning with Z in column K.

If you are new to macros, this link to Jon Peltier's site may be helpful:
http://peltiertech.com/WordPress/200...e-elses-macro/

Hope this helps,

Hutch

"vijay" wrote:

i am working with a organisation.where i need to work on a Excel Sheet daily.
It would be helpful if you get me done this, as it would save my lot of time
and would decrease my work load.
Problem as follow. Version (Excel 2003)
A B C D E F G H I J K L M N
1 I don't want macro to work on first 5 rows
2 I don't want macro to work on first 5 rows
3 I don't want macro to work on first 5 rows
4 I don't want macro to work on first 5 rows
5 I don't want macro to work on first 5 rows
6 A B C D E F G H I J K L M N
7 ST ET Y Z
8 ST ET Y Z
9 ST ET Y Z

The above A,B,C, are the Column, and to the right side rows with numbers.
Daily i do no. of file, which needs to be update in the Excel.
In column "F7" i have keyed "ST" that is equal to start time, before
starting with each new file i need to key the Start time in column "F", and
after completion of that file i need to key end time in column "G". In Column
"G7" ED stands for end time. Rest of the column are having other details that
i need to fill in.
Daily i do huge no. of files, for which i need to key the time everynow and
then.
What i want is whenever i Key "Y"=(file name) in column "I7" the cell in
"F7" should automatically pickup the current time of the system as "Start
Time". And after completing of that file, when i key "Z"=(file name) in
column "K7" the cell in "G7" should automatically pickup the current time of
the system as "End Time".
I don't want to use shortcut keys for the current time every time.
It would be helpful if you get MACRO written for me on this.

--
vijay

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Help for Excel time format "MACRO"

Tom,

Thanks
I will refer to those.
--
vijay


"Tom Hutchins" wrote:

Debra Dalgleish has a list of books at her site:
http://www.contextures.com/xlbooks.html

John Walkenbach's book "Excel 2003 Power Programming with VBA" is very good.

There are great online resources also for learning VBA. Here are a few:
www.cpearson.com/excel.htm
www.rondebruin.nl/
www.xldynamic.com/source/xld.html
www.contextures.com/
www.dicks-blog.com
www.mcgimpsey.com/

and don't forget http://www.mvps.org/dmcritchie/excel/getstarted.htm

or the link I gave you already:
http://peltiertech.com/WordPress/200...e-elses-macro/

Hope this helps,

Hutch

"vijay" wrote:

Hutch,

Thanks for that Tom. It would really save lot of my time. Frankly speaking i
don't no anything about MACRO, but i am very much interested to learn it .
Can u suggest me on that what is the book that i need to refer. Anyway now i
am asking more from u. But really thanks again for your help.
--
vijay


"Tom Hutchins" wrote:

Okay, try this code instead:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row < 6 Then Exit Sub
Select Case Target.Column
Case 9: 'column I
If Len(Target.Value) 0 Then
Cells(Target.Row, 6).Value = Time
End If
Case 11: 'column K
If Len(Target.Value) 0 Then
Cells(Target.Row, 7).Value = Time
End If
End Select
End Sub

This will put the current time in F or G when you enter anything in I or K.

Hope this helps,

Hutch

"vijay" wrote:

Hi,
Hutch

Thanks for that,But my problem is, whatever i wrote in below was an example
i do not key only "Y" in column "I", i need to key different file name such
as(MARNOK_CHAREO_2_000233), and each and every file are different from each
other.
so now it does't show any time in column "F" when i key/paste the above
file, also it is same for Column "K" i do not key only "Z" in that column.
I would be thankful if u help me with this as well.
--
vijay


"Tom Hutchins" wrote:

Right-click on the sheet tab of your worksheet and select 'View Code'. This
opens the Visual basic Editor (VBE). Paste the following code in the big
blank window:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row < 6 Then Exit Sub
Select Case Target.Column
Case 9: 'column I
If UCase(Left(Target.Value, 1)) = "Y" Then
Cells(Target.Row, 6).Value = Time
End If
Case 11: 'column K
If UCase(Left(Target.Value, 1)) = "Z" Then
Cells(Target.Row, 7).Value = Time
End If
End Select
End Sub

Select File Save, then File Close to close the VBE and return to
normal Excel. The time will be stamped in column F on the same row when you
enter anything beginning with Y in column I. The time will be stamped in
column G on the same row when you enter anything beginning with Z in column K.

If you are new to macros, this link to Jon Peltier's site may be helpful:
http://peltiertech.com/WordPress/200...e-elses-macro/

Hope this helps,

Hutch

"vijay" wrote:

i am working with a organisation.where i need to work on a Excel Sheet daily.
It would be helpful if you get me done this, as it would save my lot of time
and would decrease my work load.
Problem as follow. Version (Excel 2003)
A B C D E F G H I J K L M N
1 I don't want macro to work on first 5 rows
2 I don't want macro to work on first 5 rows
3 I don't want macro to work on first 5 rows
4 I don't want macro to work on first 5 rows
5 I don't want macro to work on first 5 rows
6 A B C D E F G H I J K L M N
7 ST ET Y Z
8 ST ET Y Z
9 ST ET Y Z

The above A,B,C, are the Column, and to the right side rows with numbers.
Daily i do no. of file, which needs to be update in the Excel.
In column "F7" i have keyed "ST" that is equal to start time, before
starting with each new file i need to key the Start time in column "F", and
after completion of that file i need to key end time in column "G". In Column
"G7" ED stands for end time. Rest of the column are having other details that
i need to fill in.
Daily i do huge no. of files, for which i need to key the time everynow and
then.
What i want is whenever i Key "Y"=(file name) in column "I7" the cell in
"F7" should automatically pickup the current time of the system as "Start
Time". And after completing of that file, when i key "Z"=(file name) in
column "K7" the cell in "G7" should automatically pickup the current time of
the system as "End Time".
I don't want to use shortcut keys for the current time every time.
It would be helpful if you get MACRO written for me on this.

--
vijay

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
Disabling the "&[Time]" or "&[T]" in Excel headers and footers John Mirabella Excel Discussion (Misc queries) 2 January 15th 10 02:54 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
How can I format elapsed time as "[mm]: ss" without getting "AM PM NavyPianoMan Excel Discussion (Misc queries) 10 August 28th 07 09:02 AM
Excel VBA to convert "dd.MM.yy" text to "dd/MM/yyyy" format date? Paul J[_2_] Excel Programming 4 July 11th 07 11:32 AM
excel - macro - automatic initiation of a macro at a pre-specified "system time" arunjoshi[_3_] Excel Programming 3 May 1st 04 09:42 AM


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