vba - Copy the last non empty cell -
i have been working on code need copy lat non empty cell of column c in spreadsheet called "support2". need paste in spreadsheet "final", on cell a2. update spreadsheet everyday , more values added on column c, that's why needs copy last one. have tried code below not working. appreciate help, thanks!
sub test()
dim mylastcell range set mylastcell = lastcell(worksheets("support2").range("c:c")) end sub ' copy range: worksheets("support2").range("c:c" & mylastcell.row).copy else msgbox ("there no data in specified range") end if
end sub
needed sheet("support2) in it
sub test() sheets("support2").range("c" & sheets("support2").range("c1").end(xldown).row).copy sheets("final").range("a2").pastespecial (xlpastevalues)
end sub
Comments
Post a Comment