H
hombreazul
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;@"
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;@"