A
Arishy
There is a weak area in VBA Excel that is driving me crazy.!
The use of End(xlDown)
Even John Walkenbach states it clearly in his wonderful book.
"The use of End method may not produce the desired result..."
There is only one place ...here... that I feel confident that will
provide the answer..(Yes, I believe there must be a solution).
To state this challenge as clear as possible :
I have a column say B The column HAS blank cells
Column A Column B:
1 Blank
2 1
3 1
4 1
5 Blank
6 Blank
7 2
8 2
9 2
10 Blank
11 3
12 3
13 3
I need to get the ROW numbers for start and finish of group "1" etc
If the activecell is on cells(2,2) the cell value "1"
Range(activecell,activecell.End(xlDown).select
I get the address of the last "3" cells(13,2)
the "correct answer" should be cells(4,2).
I am sure you will come up of a way around it, but how one using the
END method come up with the code that will give reliable answer. and
while we are at it WHY we get wrong answer in the first place.
The use of End(xlDown)
Even John Walkenbach states it clearly in his wonderful book.
"The use of End method may not produce the desired result..."
There is only one place ...here... that I feel confident that will
provide the answer..(Yes, I believe there must be a solution).
To state this challenge as clear as possible :
I have a column say B The column HAS blank cells
Column A Column B:
1 Blank
2 1
3 1
4 1
5 Blank
6 Blank
7 2
8 2
9 2
10 Blank
11 3
12 3
13 3
I need to get the ROW numbers for start and finish of group "1" etc
If the activecell is on cells(2,2) the cell value "1"
Range(activecell,activecell.End(xlDown).select
I get the address of the last "3" cells(13,2)
the "correct answer" should be cells(4,2).
I am sure you will come up of a way around it, but how one using the
END method come up with the code that will give reliable answer. and
while we are at it WHY we get wrong answer in the first place.