Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find last real row of filterred data table
Hi all,
I am using the the following code to copy data to the bottom of a dat table:- Worksheets("Dialog11").Range("A2:AA2").Copy _ Destination:=Worksheets("Project Log Form").Cells(Rows.Count 1).End(xlUp)(2) Problem is that this code works fine when the autofilters are no applied but if a filter is set the code copies the data to the las visible row. Does anyone have any clues on how to add the data to the real las row. If it makes life easier, each data entry has a unique ID in column and the highest ID number is always located in the last real row. Any help would be greatfully received. Ta And -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find last real row of filterred data table
Dim rng as Range
With Worksheets("Project Log Form) if .AutofilterMode and .FilterMode then set rng = .Autofilter.Range set rng = rng.offset(rng.rows.count,0).Resize(1,1) set rng = .cells(rng.row,1) else set rng = .Cells(rows.count,1).End(xlup) End if End With Worksheets("Dialog11").Range("A2"AA2").copy _ Destination:=rng -- Regards, Tom Ogilvy "andibevan " wrote in message ... Hi all, I am using the the following code to copy data to the bottom of a data table:- Worksheets("Dialog11").Range("A2:AA2").Copy _ Destination:=Worksheets("Project Log Form").Cells(Rows.Count, 1).End(xlUp)(2) Problem is that this code works fine when the autofilters are not applied but if a filter is set the code copies the data to the last visible row. Does anyone have any clues on how to add the data to the real last row. If it makes life easier, each data entry has a unique ID in column B and the highest ID number is always located in the last real row. Any help would be greatfully received. Ta Andi --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
data table - hmz - 2nd posting because could not find the first on | New Users to Excel | |||
Find a column of data in a table | Excel Worksheet Functions | |||
How can I find out where data in piviot table comes from | Excel Discussion (Misc queries) | |||
Find data in one table from another. | Excel Worksheet Functions | |||
HOW DO I FIND DATA IN A TABLE BY LOOKING UP BOTH THE COLUMN AND R. | Excel Worksheet Functions |