variable row count 2

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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/
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top