Hello. Given the following code, how can I have the result of the
formulas hardcoded? I tried simply adding .value at the end of each,
but that did not work! Thanks!
LastRow = Worksheets("Log").Cells(Cells.Rows.Count, "A").End(xlUp).Row
With Worksheets("Log")
.Range("A" & LastRow + 1).Formula = "='Extended Terms'!C8"
.Range("B" & LastRow + 1).Formula = "='Extended Terms'!C6"
.Range("C" & LastRow + 1).Formula = "='Extended Terms'!C5"
.Range("D" & LastRow + 1).Formula = "='Extended Terms'!C7"
.Range("E" & LastRow + 1).Formula = "='Extended Terms'!C17"
.Range("F" & LastRow + 1).Formula = "='Extended Terms'!C23"
.Range("G" & LastRow + 1).Formula = "='Extended Terms'!C11"
.Range("H" & LastRow + 1).Formula = "='Extended Terms'!C77"
.Range("I" & LastRow + 1).Formula = "='Extended Terms'!C12"
.Range("J" & LastRow + 1).Formula = "='Extended Terms'!I8"
.Range("K" & LastRow + 1).Formula = "='Extended Terms'!I7"
End With
Don Guillett - 21 Mar 2008 20:05 GMT
Please give YOUR definition of "hardcoded" If you mean you want to leave the
values instead of the formulas then
either change to values when finished
.Range(cells("A",LastRow + 1),cells("k",lastrow+1)).value = _
.Range(cells("A",LastRow + 1),cells("k",lastrow+1)).value
or this idea
.Range("A" & LastRow + 1).value= sheets("Extended Terms").range("C8")

Signature
Don Guillett
Microsoft MVP Excel
SalesAid Software
dguillett1@austin.rr.com
> Hello. Given the following code, how can I have the result of the
> formulas hardcoded? I tried simply adding .value at the end of each,
[quoted text clipped - 15 lines]
> .Range("K" & LastRow + 1).Formula = "='Extended Terms'!I7"
> End With
Dave Peterson - 21 Mar 2008 20:18 GMT
Instead of lines like this:
.Range("A" & LastRow + 1).Formula = "='Extended Terms'!C8"
You could use:
.Range("A" & LastRow + 1).value = worksheets("extended terms").range("C8").value
Depending on what's in those cells, you may want:
with .Range("A" & LastRow + 1)
.numberformat = worksheets("extended terms").range("C8").numberformat
.value = worksheets("extended terms").range("C8").value
end with
> Hello. Given the following code, how can I have the result of the
> formulas hardcoded? I tried simply adding .value at the end of each,
[quoted text clipped - 15 lines]
> .Range("K" & LastRow + 1).Formula = "='Extended Terms'!I7"
> End With

Signature
Dave Peterson