Thread: help with macro
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default help with macro

Sub ProcZ()
Dim cell as Range, rng as Range
set rng = Range(cells(1,"Z"),cells(rows.count,"Z").End(xlup) )
for each cell in rng
if cell.Value = 1 then
cells(cell.row,"K").Value = Date
cell.Entirerow.Copy
cells(cell.row,1).EntireRow.Pastespecial xlValues
cell.Formula = "=If(Sub!C1=6,1,"""")"
end if
Next
End Sub

--
Regards,
Tom Ogilvy

"Tim" wrote in message
...
Hi
I need help to create a macro which will look in
column "Z"
and if any cell in this column has value 1 then do this:
1) On the entire row with offset put in column "K"
current date
2) Entire row Copy-Paste Special-Values
3) Entire row change value 1 in column "Z" with the
formula: =IF(sub!C1=6,1,"")
Any help is highly appreciated.