Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Autofiltering again | Excel Discussion (Misc queries) | |||
Autofiltering | Excel Worksheet Functions | |||
Autofiltering | Excel Programming | |||
help wanted urgent | Excel Programming | |||
urgent vba code wanted | Excel Programming |