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

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -