![]() |
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 |
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 |
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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 08:04 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com