Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 7
Default Macro moving with daily date

Macro needs to move with date down a row each day including other cell
referances when I run the macro.
--
paintbrush
Here is day 3 macro below, or do I need to make 31
Macros?
Range("G3").Select
ActiveCell.FormulaR1C1 = "=TODAY()"
Range("J3").Select
ActiveCell.FormulaR1C1 = "=RC[-1]*7"
Range("K3").Select
ActiveCell.FormulaR1C1 = "=R[7]C[-5]"
Range("K3").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range("E2:E9").Select
Selection.ClearContents

  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2,722
Default Macro moving with daily date

'Assuming row corresponds to date:

Sub MyMacro()
Dim x As Integer

'Determine what day it is
x = Format(Date, "d")

Cells(x, "G").Formula = "=TODAY()"
Cells(x, "J").FormulaR1C1 = "=RC[-1]*7"
Cells(x, "K").FormulaR1C1 = "=R[7]C[-5]"
Cells(x, "K") = Cells(x, "K").Value
Range("E2:E9").ClearContents

End Sub
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"paintbrush" wrote:

Macro needs to move with date down a row each day including other cell
referances when I run the macro.
--
paintbrush
Here is day 3 macro below, or do I need to make 31
Macros?
Range("G3").Select
ActiveCell.FormulaR1C1 = "=TODAY()"
Range("J3").Select
ActiveCell.FormulaR1C1 = "=RC[-1]*7"
Range("K3").Select
ActiveCell.FormulaR1C1 = "=R[7]C[-5]"
Range("K3").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range("E2:E9").Select
Selection.ClearContents

  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 7
Default Macro moving with daily date

Luke, I paintbrush is having trouble with the information you gave me. It
worked 5 times with "00" for the next to last step, last cleared well, but I
worked on the formulas for trying to get it corrected without good results.
I use copy and past to get the fromula into the macro and it appeared to work
almost. I have tried several times to recopy with good results. If there is
a way to solve my problem I will make it worth your time-somehow.
paintbrush
--
paintbrush


"Luke M" wrote:

'Assuming row corresponds to date:

Sub MyMacro()
Dim x As Integer

'Determine what day it is
x = Format(Date, "d")

Cells(x, "G").Formula = "=TODAY()"
Cells(x, "J").FormulaR1C1 = "=RC[-1]*7"
Cells(x, "K").FormulaR1C1 = "=R[7]C[-5]"
Cells(x, "K") = Cells(x, "K").Value
Range("E2:E9").ClearContents

End Sub
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"paintbrush" wrote:

Macro needs to move with date down a row each day including other cell
referances when I run the macro.
--
paintbrush
Here is day 3 macro below, or do I need to make 31
Macros?
Range("G3").Select
ActiveCell.FormulaR1C1 = "=TODAY()"
Range("J3").Select
ActiveCell.FormulaR1C1 = "=RC[-1]*7"
Range("K3").Select
ActiveCell.FormulaR1C1 = "=R[7]C[-5]"
Range("K3").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range("E2:E9").Select
Selection.ClearContents

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
Moving Rowes based on Date value with a macro Max2073 Excel Worksheet Functions 7 September 8th 09 01:54 PM
Macro: Unhiding a row daily GMD Excel Discussion (Misc queries) 1 March 18th 09 06:22 PM
Auto Calculating Daily interest on a moving balance? Matt Excel Discussion (Misc queries) 0 February 24th 09 03:40 PM
Make date change in excel to current date when opening daily? jamie Excel Discussion (Misc queries) 3 March 1st 06 03:37 PM
Daily Macro Triggering JB2010 Excel Discussion (Misc queries) 2 November 2nd 05 04:28 PM


All times are GMT +1. The time now is 05:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"