Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default variable row count 2

Hello

I have to make a variable selection on wich i do a sort function.
I already had become a piece of code to detect te end of the rows, but that
isnt going to work here, because there is a second field of rows that are
variable.
So is it possible to search on a certain text for detecting te variable
rows? and than make a selection to this certain text?

X\
X fixed rows
X/
1\
2
3 variable rows on wich te sort fuction has to be applied
4
5/
x\ CERTAIN TEXT
x
x fixed rows
x
x/
1\
2 variable rows (no sort function)
3/
x\
x fixed rows
x/
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default variable row count 2

How do you know when the variable rows stop? Is it when there is an X ?
Some real data would be handy.

The pseudocode might look a little like:

startingrow = 4
currentrow = startingrow
if cells(currentrow, 1) < "x" then
do until cells(currentrow, 1) = "x"
currentrow = currentrow + 1
loop
end if
range(cells(startingrow, 1), cells(currentrow-1, 1)).sort



--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Bart" wrote in message
...
Hello

I have to make a variable selection on wich i do a sort function.
I already had become a piece of code to detect te end of the rows, but
that
isnt going to work here, because there is a second field of rows that are
variable.
So is it possible to search on a certain text for detecting te variable
rows? and than make a selection to this certain text?

X\
X fixed rows
X/
1\
2
3 variable rows on wich te sort fuction has to be applied
4
5/
x\ CERTAIN TEXT
x
x fixed rows
x
x/
1\
2 variable rows (no sort function)
3/
x\
x fixed rows
x/



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
count number of dates in a row of cel before or after a variable d TBA Excel Worksheet Functions 5 April 22nd 09 03:08 AM
Count in a variable range Ron@Buy Excel Worksheet Functions 4 September 27th 07 08:24 AM
Count if multiple variable exist Stan Excel Discussion (Misc queries) 1 March 16th 07 03:30 PM
Multiple Variable Count problem Robbie_lambert Excel Worksheet Functions 1 May 5th 06 02:44 PM
Using the Lastrow variable in a Count/Countif formula John[_80_] Excel Programming 2 April 17th 04 03:44 AM


All times are GMT +1. The time now is 11:30 PM.

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"