Daily Macro for 31 days

  • Thread starter Thread starter paintbrush
  • Start date Start date
P

paintbrush

I am having problems with the Macro below. The 6th line is off somehow or
6,7,8,9, being off. Would appreciate any help on the line or any other
problem you see with the Macro.

Sub BuildingSalvage()
'Assuming row Corresponds to date:

'Sub MyMacro()
'Dim x As Integer

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

Cells(x, "G").Formula = Date
Cells(x, "J").FormulaR1C1 = "=RC[-1]*7"
Cells(x, "K").FormulaR1C1 = "=R[7]C[-5]"
Range("f32").Select
Selection.Copy
Range("K").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks_:=False, Transpose:=False
'Cells(x, "K") = Cells(x, "K").Value
Range("E1:E31").ClearContents

End Sub

Line 6 needs to copy cell F32 and place it in line K at its permanent date.
Using columns A-K in Worksheet.
 
Hi

Range("K") is not a valid cell reference.

Not sure if you want to paste in row x, but maybe this:

Range("K" & x).select

Or better:

Range("F32").Copy
Range("K" & x).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks_:=False, Transpose:=False

Hopes this helps.
....
Per
 
instead of > Range("f32").Select
Selection.Copy
Range("K").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks_:=False, Transpose:=False
try
Cells(x, "K").value = Cells(32, "F").Value

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(e-mail address removed)
paintbrush said:
I am having problems with the Macro below. The 6th line is off somehow or
6,7,8,9, being off. Would appreciate any help on the line or any other
problem you see with the Macro.

Sub BuildingSalvage()
'Assuming row Corresponds to date:

'Sub MyMacro()
'Dim x As Integer

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

Cells(x, "G").Formula = Date
Cells(x, "J").FormulaR1C1 = "=RC[-1]*7"
Cells(x, "K").FormulaR1C1 = "=R[7]C[-5]"
Range("f32").Select
Selection.Copy
Range("K").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks_:=False, Transpose:=False
'Cells(x, "K") = Cells(x, "K").Value
Range("E1:E31").ClearContents

End Sub

Line 6 needs to copy cell F32 and place it in line K at its permanent
date.
Using columns A-K in Worksheet.
 
Don G this was the best news anyone could find on the internet. You make my
day, no Last 3 week I have been working on this problem without any good
results. I never thought that taking the F32 apart would work. thanks,
thanks, for your help. SG

--
paintbrush


Don Guillett said:
instead of > Range("f32").Select
Selection.Copy
Range("K").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks_:=False, Transpose:=False
try
Cells(x, "K").value = Cells(32, "F").Value

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(e-mail address removed)
paintbrush said:
I am having problems with the Macro below. The 6th line is off somehow or
6,7,8,9, being off. Would appreciate any help on the line or any other
problem you see with the Macro.

Sub BuildingSalvage()
'Assuming row Corresponds to date:

'Sub MyMacro()
'Dim x As Integer

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

Cells(x, "G").Formula = Date
Cells(x, "J").FormulaR1C1 = "=RC[-1]*7"
Cells(x, "K").FormulaR1C1 = "=R[7]C[-5]"
Range("f32").Select
Selection.Copy
Range("K").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks_:=False, Transpose:=False
'Cells(x, "K") = Cells(x, "K").Value
Range("E1:E31").ClearContents

End Sub

Line 6 needs to copy cell F32 and place it in line K at its permanent
date.
Using columns A-K in Worksheet.

.
 
Back
Top