Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
data table - hmz - 2nd posting because could not find the first on hmz New Users to Excel 1 January 5th 10 03:19 PM
Find a column of data in a table WBTKbeezy Excel Worksheet Functions 2 September 30th 09 09:08 PM
How can I find out where data in piviot table comes from kristall Excel Discussion (Misc queries) 1 October 24th 07 12:18 PM
Find data in one table from another. micmed Excel Worksheet Functions 23 January 22nd 06 11:45 PM
HOW DO I FIND DATA IN A TABLE BY LOOKING UP BOTH THE COLUMN AND R. Ziv Excel Worksheet Functions 2 February 3rd 05 06:29 AM


All times are GMT +1. The time now is 08:43 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"