LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Relative cell references

I recorded a macro to enter the current time using the "Now()" function and
then copy and paste as a value so that the value remains constant. Then I
want to point to another cell and repeate the process. However the following
macro only goes back to the original cell that was used when the macro is
first invoked. How do I set a "relative cell reference? I'm trying to
create a time card template for posting an employee's log-in time and log-out
time and then compute total hours worked.

My Macro:
'TimeInput Macro
'
ActiveCell.FormulaR1C1 = "=NOW()"
Range ("B5").Select I want this to be
relative to
where the
currently selected cell is
Selection.Copy
Selection.PasteSpecial Paste:=x1PaxteValues, Operation:=x1None, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
End Sub
 
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
convert relative cell references to absolute cell references via amacro? Dave F[_2_] Excel Discussion (Misc queries) 1 May 15th 08 04:43 PM
Transpose relative cell references Zakynthos Excel Programming 0 July 27th 06 03:37 PM
relative cell references Thomas F[_2_] Excel Programming 3 July 19th 05 02:49 PM
Transpose-relative cell references would be useful. carlmanaster Excel Worksheet Functions 7 March 15th 05 01:04 AM
relative cell references in vba macro Sarah Bendele Excel Programming 2 January 19th 04 10:02 PM


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