Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default urgent help with autofiltering wanted


autofilter hides rows that don't meet the criteria, but the values ar
still there. however, when i use code like:


Code
-------------------
NumIn = InputBox.Value
Range(Range("AF1"), Range("AF1").Offset(NumIn - 1, 0)).Value = Range(Range("A366"), Range("A366").Offset(NumIn - 1, 0)).Valu
-------------------


offsets will consider every row, even the ones that are hidden. i
there a way to make it so that it will consider only those rows tha
are shown?

thanks

--
dream
-----------------------------------------------------------------------
dreamz's Profile: http://www.excelforum.com/member.php...fo&userid=2646
View this thread: http://www.excelforum.com/showthread.php?threadid=53855

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default urgent help with autofiltering wanted

Not using that approach.

Regards,
Tom Ogilvy



"dreamz" wrote:


autofilter hides rows that don't meet the criteria, but the values are
still there. however, when i use code like:


Code:
--------------------
NumIn = InputBox.Value
Range(Range("AF1"), Range("AF1").Offset(NumIn - 1, 0)).Value = Range(Range("A366"), Range("A366").Offset(NumIn - 1, 0)).Value
--------------------


offsets will consider every row, even the ones that are hidden. is
there a way to make it so that it will consider only those rows that
are shown?

thanks.


--
dreamz
------------------------------------------------------------------------
dreamz's Profile: http://www.excelforum.com/member.php...o&userid=26462
View this thread: http://www.excelforum.com/showthread...hreadid=538556


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default urgent help with autofiltering wanted


hmm, any suggestions

--
dream
-----------------------------------------------------------------------
dreamz's Profile: http://www.excelforum.com/member.php...fo&userid=2646
View this thread: http://www.excelforum.com/showthread.php?threadid=53855

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default urgent help with autofiltering wanted

based on the limited information provided:

Dim NumIn as Long, rng as Range, rng1 as Range
NumIn = InputBox.Value
set rng = Range(Range("A366"), Range("A366").Offset(NumIn - 1, 0))
set rng1 = rng.specialcells(xlvisible)
if not rng1 is nothing then
Range("AF1").paste
end if

--
Regards,
Tom Ogilvy

"dreamz" wrote:


hmm, any suggestions?


--
dreamz
------------------------------------------------------------------------
dreamz's Profile: http://www.excelforum.com/member.php...o&userid=26462
View this thread: http://www.excelforum.com/showthread...hreadid=538556


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default urgent help with autofiltering wanted


hmm, thanks. i'll try that.

i came up with something like this:

Range(Range("AF1"), Range("AF1").Offset(NumIn - 1, 0)).Value =
Range("A366:A727").SpecialCells(xlCellTypeVisible) .Value

in other words, range AF1 to AFx, where x depends on the number that
was entered, and the values of the visible cells. that worked in a
dummy file i came up with, but for some reason, it doesn't work in the
workbook i'm using (it just repeats the first item in the list).


--
dreamz
------------------------------------------------------------------------
dreamz's Profile: http://www.excelforum.com/member.php...o&userid=26462
View this thread: http://www.excelforum.com/showthread...hreadid=538556



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default urgent help with autofiltering wanted

I wouldn't see it ever working.

--
Regards,
Tom Ogilvy

"dreamz" wrote in
message ...

hmm, thanks. i'll try that.

i came up with something like this:

Range(Range("AF1"), Range("AF1").Offset(NumIn - 1, 0)).Value =
Range("A366:A727").SpecialCells(xlCellTypeVisible) .Value

in other words, range AF1 to AFx, where x depends on the number that
was entered, and the values of the visible cells. that worked in a
dummy file i came up with, but for some reason, it doesn't work in the
workbook i'm using (it just repeats the first item in the list).


--
dreamz
------------------------------------------------------------------------
dreamz's Profile:

http://www.excelforum.com/member.php...o&userid=26462
View this thread: http://www.excelforum.com/showthread...hreadid=538556



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
Autofiltering again computexcel Excel Discussion (Misc queries) 6 September 14th 08 09:11 PM
Autofiltering Thapelo Excel Worksheet Functions 3 November 5th 07 06:44 AM
Autofiltering musictech[_4_] Excel Programming 3 August 1st 05 09:09 PM
help wanted urgent Daniel Macgaw[_2_] Excel Programming 3 July 28th 04 11:43 AM
urgent vba code wanted helmekki Excel Programming 2 May 12th 04 12:38 PM


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

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

About Us

"It's about Microsoft Excel"