Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
hombreazul
 
Posts: n/a
Default macro problem

Hi. Long time reader, first time poster.... :)

First, let me say that I am a complete newbie. Now that that's out of
the way. I recorded my first macro today. It is simple, but it gave
me great joy. I apply the macro to determine on/off phone time. What
I would like it to do is to move down the data columns and stop once no
data is found. For example, if the last call occurs on row 323, the
the macro should stop then, without inserting a bunch of zeros because
of the missing values. I hope I explained this properly and that
someone can help this really green dude. I am pasting the macro as is,
below. Thanks in advance.

K.

Range("F1").Select
ActiveCell.FormulaR1C1 = "total time"
Range("G1").Select
ActiveCell.FormulaR1C1 = "on time"
Range("H1").Select
ActiveCell.FormulaR1C1 = "off time"
Range("A2").Select
ActiveWindow.FreezePanes = True
Range("F3").Select
ActiveCell.FormulaR1C1 = "=RC[-5]-R[-1]C[-5]+(RC[-5]R[-1]C[-5])"
Range("G3").Select
ActiveCell.FormulaR1C1 = "=R[-1]C[-3]/(24*3600)"
Range("H3").Select
ActiveCell.FormulaR1C1 = "=RC[-2]-RC[-1]"
Range("I3,F:F,G:G,H:H").Select
Range("H1").Activate
Selection.NumberFormat = "h:mm:ss;@"

 
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
Problem in macro Micos3 Excel Discussion (Misc queries) 2 February 23rd 06 02:20 PM
Macro Help In Excel welshlad Excel Discussion (Misc queries) 14 October 26th 05 02:34 PM
deleting a macro resulted in a problem militant Excel Discussion (Misc queries) 0 April 26th 05 05:21 AM
External data Macro Problem Excel 97 Craig Kelly Excel Discussion (Misc queries) 1 January 17th 05 03:17 PM
Problem executing a macro from different workbook where it is Sergio Calleja Excel Discussion (Misc queries) 1 January 17th 05 12:38 PM


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