LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to choose Random rows??


hi Saarang,

Thank you for identifying & providing the link to the crosspost -
hopefully we can help.




Saarang84;740535 Wrote:

...


VBA Code:
--------------------


Resize(.Rows.Count - 1, 1).Offset(i, fCol).SpecialCells(xlCellTypeVisible) = "Sample_" & i
--------------------



I want to mark only certain number of rows (stored in the variable

randRow) as samples. But the above line of code marks all the rows
filtered. How can this be fixed??



I don't think it's very likely but does the below work?


VBA Code:
--------------------


Resize(.Rows.Count - 1, 1).Offset(i, fCol).SpecialCells(xlCellTypeVisible).resize(randR ow,1).value2 = "Sample_" & i
--------------------



If not, then you may have to loop through each area within the range of
visible cells until you get to the number of rows represented by
randRow. I'll look through your code in detail over the weekend & see if
I can come up with an answer for you...

hth
Rob


--
broro183

Rob Brockett. Always learning & the best way to learn is to
experience...
------------------------------------------------------------------------
broro183's Profile: http://www.thecodecage.com/forumz/member.php?u=333
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=207872

http://www.thecodecage.com/forumz


--- news://freenews.netfront.net/ - complaints: ---
 
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
How do I choose the rows that are filtered ? cupertino Excel Programming 1 February 16th 12 03:55 AM
Is it possible to choose a certain amount of rows and have them ex ocean Excel Worksheet Functions 6 July 22nd 09 02:32 AM
Formula to choose X number of unique random cells from array? Techhead Excel Programming 5 April 18th 08 09:49 AM
how to choose random namber form loop? pm[_2_] Excel Programming 4 February 3rd 06 08:10 AM
How can I choose alternate rows in a column? pnair New Users to Excel 2 December 17th 05 05:16 AM


All times are GMT +1. The time now is 02:50 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"