Date is not permanent

P

paintbrush

My fromula is off. The date changes each day plus the previous day-how to
make permanent-Column K in fromula. Line 2 is Ok. Line 3 & 4 yields 00's,
not a copy of F32. Will include Formula and work sheet to understand.

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 = "=TODAY()"
Cells(x, "J").FormulaR1C1 = "=RC[-1]*7"
Cells(x, "K").FormulaR1C1 = "=R[7]C[-5]"
Cells(x, "K") = Cells(x, "K").Value
Range("E1:E31").ClearContents

End Sub

Line 9 & 10, C. E is blank, table-day changes previous day C. G, & column K
is 00's should have be F 32 total copied to K.
2x6 12' $5.49 $2.75 $2.6 0 11/10/2009 6 42 $294.00 $0.00
2x6 14 $6.46 $3.23 $2.2 0 11/10/2009 3 21 $147.00 $0.00
 
G

Gary''s Student

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]"
Cells(x, "K") = Cells(x, "K").Value
Range("E1:E31").ClearContents

End Sub
 
P

paintbrush

Gary"s Student
I am still having problem with line 4 in the formula. Your date was on the
mark.
Here is the formula as is now.

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]"
Cells(x, "F32") = Cells(x, "K").Value <This line copy f32 and place in K
column
Range("E1:E31").ClearContents How can this be done for 31 days?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top