Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What would be the best way to accomplish this task?
Search across rows to the last value in that row, copy that value and paste it into a different sheet. I have multiple rows that I need to do this with, but they are non-contiguous. Thanks in advance! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
First you need to get the last row using the end statnment. rows.Count is an
excel constant which is set to 65364 and xlup seaches from the last row until it find the first cell with data. Then do the same thing with columns LastRow = cells(rows.Count,"A").end(xlup).Row set ColAdata = range(cells(1,"A"),cells(Lastrow,"A")) for each cell in ColAdata LastCol = cells(cell.row,Columns.Count).end(xltoleft).Column copydata = cells(cell.row,LastCol) ' enter your real code below. sheets("Newsheet").range("A5") = copydata next cell "Tom" wrote: What would be the best way to accomplish this task? Search across rows to the last value in that row, copy that value and paste it into a different sheet. I have multiple rows that I need to do this with, but they are non-contiguous. Thanks in advance! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to search for grouped rows? | Excel Worksheet Functions | |||
Search and Replace Rows | Excel Programming | |||
Search Columns & Rows | Excel Discussion (Misc queries) | |||
search rows | Excel Programming | |||
Search Rows in a spreadsheet | Excel Programming |