Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Need help with Visual Script Code

Hi, someone please provide me the code for following column in excel.
Like I have a column a and column b. In column a, I have time and in
column b, I have time in 0:30 minutes interval. So consolidating column
a into column b with half an hour difference. I want a macro or script
where data in colum B automatically comes with time distances and in the
same parameter with same slot (30 minutes)



a b
0:07 0:00
0:08 0:00
0:10 0:00
0:13 0:00
0:14 0:00
0:18 0:00
0:21 0:00
0:25 0:00
0:27 0:00
0:29 0:00
0:41 0:30
0:42 0:30
0:50 0:30
1:14 1:00
1:16 1:00
1:22 1:00
1:28 1:00
1:29 1:00
1:58 1:30
2:01 2:00


Please help me.

*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Need help with Visual Script Code

Sub Clearout()
Dim LastRow As Long
Dim i As Long

LastRow = Range("A" & Rows.Count).End(xlUp).Row
For i = 1 To LastRow
Cells(i, "B").Value = Int(Cells(i, "A").Value * 48) / 48
Next i
Columns(2).NumberFormat = "hh:mm"
End Sub


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"sharad kumar" wrote in message
...
Hi, someone please provide me the code for following column in excel.
Like I have a column a and column b. In column a, I have time and in
column b, I have time in 0:30 minutes interval. So consolidating column
a into column b with half an hour difference. I want a macro or script
where data in colum B automatically comes with time distances and in the
same parameter with same slot (30 minutes)



a b
0:07 0:00
0:08 0:00
0:10 0:00
0:13 0:00
0:14 0:00
0:18 0:00
0:21 0:00
0:25 0:00
0:27 0:00
0:29 0:00
0:41 0:30
0:42 0:30
0:50 0:30
1:14 1:00
1:16 1:00
1:22 1:00
1:28 1:00
1:29 1:00
1:58 1:30
2:01 2:00


Please help me.

*** Sent via Developersdex http://www.developersdex.com ***



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
Save as Visual Script Help Jeremy Excel Discussion (Misc queries) 1 December 8th 09 09:02 PM
Visual Script to find smallest number greater than 0 Jeremy Excel Discussion (Misc queries) 3 October 30th 09 08:32 PM
VB Script Code needed for Grouping Rows Abhi_Rise Excel Discussion (Misc queries) 0 February 19th 08 02:01 PM
How to display unicode character in Visual Basic script. kiendt Excel Programming 0 May 16th 06 01:41 AM
How do I include wsh or vbs code/script in an Excel macro Naived Merchant Excel Programming 1 May 27th 04 02:38 PM


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