View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Dynamic Copy/Paste Special Formulas/Paste Special Values

Assume the formulas should not adjust:

Sub ProcessLastRow()
Dim rng as Range, rng1 as Range
Dim cell as Range
set rng = Cells(rows.count,1).end(xlup)
set rng1 = Range(cells(rng.row,1),Cells(rng.row,256).End(xlto Left))
rng1.copy
rng1.offset(1,0).pastespecial xlFormats
for each cell in rng1
if cell.hasformula then
cell.offset(1,0).Formula = cell.formula
cell.formula = cell.Value
end if
Next
End Sub

--
Regards,
Tom Ogilvy

"Sharon Perez" wrote in message
...
How would someone copy the last row of data on a sheet, go
down one row, paste only the formulas, then go to the
original row and paste the values. The original row would
have the same values but no formulas and the next row
would then have the formulas. This needs to be dynamic
because the rows would increase by one row daily and the
reference would change each day. Thanks!