Weird VBA Behaviour

M

msnyc07

Again, I'll apologize as not a coder, I am fixing code I was provided. I
checked and checked and determined somehow that the VBA is WORKING as are my
formulas but somehow it works sometimes and sometimes not. Does anyone have
any idea what could be happening here?

Basically I a have column called ‘Levels’ that determines parenting and
those Levels are derived by an Indenture Formula.

So I have

Level | Name

Which ends up parsing as

Name | Parent

0Main
1>Sub1
1>Sub2
2>>Sub2A
2>>Sub2B
3>>>Sub2BA
3>>>Sub2BB
2>Sub2B

Sub 1 | Main
Sub 2 | Main
Sub2A | Sub2

etc

I was running into errors on the parsing because when it stepped back up
(in this case to Sub2B) it got the wrong parent.

I thought something was wrong with the code that parsed the Level/Name

On a lark I recreated the same data beneath itself but this time I pasted
the Level Values in as Values rather then formulas.

Now the Parent Level Worked.

So I figured ok it is having trouble parsing the code and the formula.

So as a final test I copied the data a third time beneath the non-working
group (with formulas) and the working group (w/o formulas) but pasted
normally, i.e. kept the formulas.

And lo and behold the first group still parsed WRONG, the group with the
fixed values parsed correctly, but the third group with the EXACT same values
AND with the formulas ALSO worked fine.

So I’ve determined that:

The VBA works fine

The Formulas are not a problem

So how could this work sometimes but not others when the values are exactly
the same?

The only difference between the first and last group is the rows they start
on otherwise 100% identical.


----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/com...dg=microsoft.public.excel.worksheet.functions
 
M

msnyc07

Update. I tried pasting in blank rows on top of the first group but even
though that changes HOW it processed wrong it still did. The other
(identical records) still process perfectly.
 
J

JLatham

I think that the folks at Microsoft are going to need a copy of the workbook
you're working with to even begin to figure this out. You need to find a
place to make it available on the web and provide a link to it so that
someone can take a look at the code, data, and formulas involved.
 
M

macropod

Hi JLatham,
I think that the folks at Microsoft are going to need a copy of the workbook
These newsgroups are user-supported - the help given is generally not by Microsoft employees (and that includes MVPs like me).
 
M

msnyc07

That is what I figured as well Macropod. I thought maybe the error would
sound familiar to someone, it is a weird one.

macropod said:
Hi JLatham,
I think that the folks at Microsoft are going to need a copy of the workbook
These newsgroups are user-supported - the help given is generally not by Microsoft employees (and that includes MVPs like me).

--
Cheers
macropod
[Microsoft MVP - Word]


JLatham said:
I think that the folks at Microsoft are going to need a copy of the workbook
you're working with to even begin to figure this out. You need to find a
place to make it available on the web and provide a link to it so that
someone can take a look at the code, data, and formulas involved.

.
 
M

macropod

Hi msnyc07,

Of course, there could be an error with your code, but without seeing it, it would be difficult for anyone to offer a solution.

For excel vba problems, the best place to post is probably microsoft.public.excel.programming.

--
Cheers
macropod
[Microsoft MVP - Word]


msnyc07 said:
That is what I figured as well Macropod. I thought maybe the error would
sound familiar to someone, it is a weird one.

macropod said:
Hi JLatham,
I think that the folks at Microsoft are going to need a copy of the workbook
These newsgroups are user-supported - the help given is generally not by Microsoft employees (and that includes MVPs like me).

--
Cheers
macropod
[Microsoft MVP - Word]


JLatham said:
I think that the folks at Microsoft are going to need a copy of the workbook
you're working with to even begin to figure this out. You need to find a
place to make it available on the web and provide a link to it so that
someone can take a look at the code, data, and formulas involved.

:

Update. I tried pasting in blank rows on top of the first group but even
though that changes HOW it processed wrong it still did. The other
(identical records) still process perfectly.

:

Again, I'll apologize as not a coder, I am fixing code I was provided. I
checked and checked and determined somehow that the VBA is WORKING as are my
formulas but somehow it works sometimes and sometimes not. Does anyone have
any idea what could be happening here?

Basically I a have column called ‘Levels’ that determines parenting and
those Levels are derived by an Indenture Formula.

So I have

Level | Name

Which ends up parsing as

Name | Parent

0Main
1>Sub1
1>Sub2
2>>Sub2A
2>>Sub2B
3>>>Sub2BA
3>>>Sub2BB
2>Sub2B

Sub 1 | Main
Sub 2 | Main
Sub2A | Sub2

etc

I was running into errors on the parsing because when it stepped back up
(in this case to Sub2B) it got the wrong parent.

I thought something was wrong with the code that parsed the Level/Name

On a lark I recreated the same data beneath itself but this time I pasted
the Level Values in as Values rather then formulas.

Now the Parent Level Worked.

So I figured ok it is having trouble parsing the code and the formula.

So as a final test I copied the data a third time beneath the non-working
group (with formulas) and the working group (w/o formulas) but pasted
normally, i.e. kept the formulas.

And lo and behold the first group still parsed WRONG, the group with the
fixed values parsed correctly, but the third group with the EXACT same values
AND with the formulas ALSO worked fine.

So I’ve determined that:

The VBA works fine

The Formulas are not a problem

So how could this work sometimes but not others when the values are exactly
the same?

The only difference between the first and last group is the rows they start
on otherwise 100% identical.


----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/com...dg=microsoft.public.excel.worksheet.functions

.
 
J

JLatham

I realize that, however, in viewing it in the Microsoft discussion forum, the
post is flagged as being a "suggestion for Microsoft". Thus my comment. In
any case, without seeing code, data and workheet functions, a solution is
going to be very difficult to come up with.

macropod said:
Hi JLatham,
I think that the folks at Microsoft are going to need a copy of the workbook
These newsgroups are user-supported - the help given is generally not by Microsoft employees (and that includes MVPs like me).

--
Cheers
macropod
[Microsoft MVP - Word]


JLatham said:
I think that the folks at Microsoft are going to need a copy of the workbook
you're working with to even begin to figure this out. You need to find a
place to make it available on the web and provide a link to it so that
someone can take a look at the code, data, and formulas involved.

.
 
D

Don Guillett

If desired, send your file to my address below. I will only look if:
1. You send a copy of this message on an inserted sheet
2. You give me the newsgroup and the subject line
3. You send a clear explanation of what you want
4. You send before/after examples and expected results.
 
J

Joe User

macropod said:
These newsgroups are user-supported - the help given is generally
not by Microsoft employees


JLatham said:
I realize that, however, in viewing it in the Microsoft discussion forum,
the post is flagged as being a "suggestion for Microsoft".

But as noted in the MSDG Help page: "Every month, Microsoft responds to the
suggestions with the most votes".

In all the years that I have read and contributed to the m.p.excel*
newsgroups (aka discussion groups), I have never seen a single response by
someone who identified him/herself as an MS employee.

And in this case, I would not blame MS for turning a deaf ear to this
"suggestion", which is a problem report at best, and more likely a user
error.


----- original message -----

JLatham said:
I realize that, however, in viewing it in the Microsoft discussion forum,
the
post is flagged as being a "suggestion for Microsoft". Thus my comment.
In
any case, without seeing code, data and workheet functions, a solution is
going to be very difficult to come up with.

macropod said:
Hi JLatham,
I think that the folks at Microsoft are going to need a copy of the
workbook
These newsgroups are user-supported - the help given is generally not by
Microsoft employees (and that includes MVPs like me).

--
Cheers
macropod
[Microsoft MVP - Word]


JLatham said:
I think that the folks at Microsoft are going to need a copy of the
workbook
you're working with to even begin to figure this out. You need to find
a
place to make it available on the web and provide a link to it so that
someone can take a look at the code, data, and formulas involved.

:

Update. I tried pasting in blank rows on top of the first group but
even
though that changes HOW it processed wrong it still did. The other
(identical records) still process perfectly.

:

Again, I'll apologize as not a coder, I am fixing code I was
provided. I
checked and checked and determined somehow that the VBA is WORKING
as are my
formulas but somehow it works sometimes and sometimes not. Does
anyone have
any idea what could be happening here?

Basically I a have column called ‘Levels’ that determines parenting
and
those Levels are derived by an Indenture Formula.

So I have

Level | Name

Which ends up parsing as

Name | Parent

0Main
1>Sub1
1>Sub2
2>>Sub2A
2>>Sub2B
3>>>Sub2BA
3>>>Sub2BB
2>Sub2B

Sub 1 | Main
Sub 2 | Main
Sub2A | Sub2

etc

I was running into errors on the parsing because when it stepped
back up
(in this case to Sub2B) it got the wrong parent.

I thought something was wrong with the code that parsed the
Level/Name

On a lark I recreated the same data beneath itself but this time I
pasted
the Level Values in as Values rather then formulas.

Now the Parent Level Worked.

So I figured ok it is having trouble parsing the code and the
formula.

So as a final test I copied the data a third time beneath the
non-working
group (with formulas) and the working group (w/o formulas) but
pasted
normally, i.e. kept the formulas.

And lo and behold the first group still parsed WRONG, the group
with the
fixed values parsed correctly, but the third group with the EXACT
same values
AND with the formulas ALSO worked fine.

So I’ve determined that:

The VBA works fine

The Formulas are not a problem

So how could this work sometimes but not others when the values are
exactly
the same?

The only difference between the first and last group is the rows
they start
on otherwise 100% identical.


----------------
This post is a suggestion for Microsoft, and Microsoft responds to
the
suggestions with the most votes. To vote for this suggestion, click
the "I
Agree" button in the message pane. If you do not see the button,
follow this
link to open the suggestion in the Microsoft Web-based Newsreader
and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/com...dg=microsoft.public.excel.worksheet.functions

.
 
M

msnyc07

Hi Don, thanks so much!

I sent the doc with what I hope are clear notes and as per your instructions.
 
J

JLatham

Yeah, I have to agree with that - seems barren territory for actual sponsored
MSFT participation (unless MVPs are considered "sponsored MSFT
participation") - LOL!

Joe User said:
macropod said:
These newsgroups are user-supported - the help given is generally
not by Microsoft employees


JLatham said:
I realize that, however, in viewing it in the Microsoft discussion forum,
the post is flagged as being a "suggestion for Microsoft".

But as noted in the MSDG Help page: "Every month, Microsoft responds to the
suggestions with the most votes".

In all the years that I have read and contributed to the m.p.excel*
newsgroups (aka discussion groups), I have never seen a single response by
someone who identified him/herself as an MS employee.

And in this case, I would not blame MS for turning a deaf ear to this
"suggestion", which is a problem report at best, and more likely a user
error.


----- original message -----

JLatham said:
I realize that, however, in viewing it in the Microsoft discussion forum,
the
post is flagged as being a "suggestion for Microsoft". Thus my comment.
In
any case, without seeing code, data and workheet functions, a solution is
going to be very difficult to come up with.

macropod said:
Hi JLatham,

I think that the folks at Microsoft are going to need a copy of the
workbook
These newsgroups are user-supported - the help given is generally not by
Microsoft employees (and that includes MVPs like me).

--
Cheers
macropod
[Microsoft MVP - Word]


I think that the folks at Microsoft are going to need a copy of the
workbook
you're working with to even begin to figure this out. You need to find
a
place to make it available on the web and provide a link to it so that
someone can take a look at the code, data, and formulas involved.

:

Update. I tried pasting in blank rows on top of the first group but
even
though that changes HOW it processed wrong it still did. The other
(identical records) still process perfectly.

:

Again, I'll apologize as not a coder, I am fixing code I was
provided. I
checked and checked and determined somehow that the VBA is WORKING
as are my
formulas but somehow it works sometimes and sometimes not. Does
anyone have
any idea what could be happening here?

Basically I a have column called ‘Levels’ that determines parenting
and
those Levels are derived by an Indenture Formula.

So I have

Level | Name

Which ends up parsing as

Name | Parent

0Main
1>Sub1
1>Sub2
2>>Sub2A
2>>Sub2B
3>>>Sub2BA
3>>>Sub2BB
2>Sub2B

Sub 1 | Main
Sub 2 | Main
Sub2A | Sub2

etc

I was running into errors on the parsing because when it stepped
back up
(in this case to Sub2B) it got the wrong parent.

I thought something was wrong with the code that parsed the
Level/Name

On a lark I recreated the same data beneath itself but this time I
pasted
the Level Values in as Values rather then formulas.

Now the Parent Level Worked.

So I figured ok it is having trouble parsing the code and the
formula.

So as a final test I copied the data a third time beneath the
non-working
group (with formulas) and the working group (w/o formulas) but
pasted
normally, i.e. kept the formulas.

And lo and behold the first group still parsed WRONG, the group
with the
fixed values parsed correctly, but the third group with the EXACT
same values
AND with the formulas ALSO worked fine.

So I’ve determined that:

The VBA works fine

The Formulas are not a problem

So how could this work sometimes but not others when the values are
exactly
the same?

The only difference between the first and last group is the rows
they start
on otherwise 100% identical.


----------------
This post is a suggestion for Microsoft, and Microsoft responds to
the
suggestions with the most votes. To vote for this suggestion, click
the "I
Agree" button in the message pane. If you do not see the button,
follow this
link to open the suggestion in the Microsoft Web-based Newsreader
and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/com...dg=microsoft.public.excel.worksheet.functions

.

.
 
D

Don Guillett

How nice that would be.....

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(e-mail address removed)
JLatham said:
Yeah, I have to agree with that - seems barren territory for actual
sponsored
MSFT participation (unless MVPs are considered "sponsored MSFT
participation") - LOL!

Joe User said:
macropod said:
These newsgroups are user-supported - the help given is generally
not by Microsoft employees


JLatham said:
I realize that, however, in viewing it in the Microsoft discussion
forum,
the post is flagged as being a "suggestion for Microsoft".

But as noted in the MSDG Help page: "Every month, Microsoft responds to
the
suggestions with the most votes".

In all the years that I have read and contributed to the m.p.excel*
newsgroups (aka discussion groups), I have never seen a single response
by
someone who identified him/herself as an MS employee.

And in this case, I would not blame MS for turning a deaf ear to this
"suggestion", which is a problem report at best, and more likely a user
error.


----- original message -----

JLatham said:
I realize that, however, in viewing it in the Microsoft discussion
forum,
the
post is flagged as being a "suggestion for Microsoft". Thus my
comment.
In
any case, without seeing code, data and workheet functions, a solution
is
going to be very difficult to come up with.

:

Hi JLatham,

I think that the folks at Microsoft are going to need a copy of the
workbook
These newsgroups are user-supported - the help given is generally not
by
Microsoft employees (and that includes MVPs like me).

--
Cheers
macropod
[Microsoft MVP - Word]


I think that the folks at Microsoft are going to need a copy of the
workbook
you're working with to even begin to figure this out. You need to
find
a
place to make it available on the web and provide a link to it so
that
someone can take a look at the code, data, and formulas involved.

:

Update. I tried pasting in blank rows on top of the first group but
even
though that changes HOW it processed wrong it still did. The other
(identical records) still process perfectly.

:

Again, I'll apologize as not a coder, I am fixing code I was
provided. I
checked and checked and determined somehow that the VBA is
WORKING
as are my
formulas but somehow it works sometimes and sometimes not. Does
anyone have
any idea what could be happening here?

Basically I a have column called ‘Levels’ that determines
parenting
and
those Levels are derived by an Indenture Formula.

So I have

Level | Name

Which ends up parsing as

Name | Parent

0Main
1>Sub1
1>Sub2
2>>Sub2A
2>>Sub2B
3>>>Sub2BA
3>>>Sub2BB
2>Sub2B

Sub 1 | Main
Sub 2 | Main
Sub2A | Sub2

etc

I was running into errors on the parsing because when it stepped
back up
(in this case to Sub2B) it got the wrong parent.

I thought something was wrong with the code that parsed the
Level/Name

On a lark I recreated the same data beneath itself but this time
I
pasted
the Level Values in as Values rather then formulas.

Now the Parent Level Worked.

So I figured ok it is having trouble parsing the code and the
formula.

So as a final test I copied the data a third time beneath the
non-working
group (with formulas) and the working group (w/o formulas) but
pasted
normally, i.e. kept the formulas.

And lo and behold the first group still parsed WRONG, the group
with the
fixed values parsed correctly, but the third group with the EXACT
same values
AND with the formulas ALSO worked fine.

So I’ve determined that:

The VBA works fine

The Formulas are not a problem

So how could this work sometimes but not others when the values
are
exactly
the same?

The only difference between the first and last group is the rows
they start
on otherwise 100% identical.


----------------
This post is a suggestion for Microsoft, and Microsoft responds
to
the
suggestions with the most votes. To vote for this suggestion,
click
the "I
Agree" button in the message pane. If you do not see the button,
follow this
link to open the suggestion in the Microsoft Web-based Newsreader
and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/com...dg=microsoft.public.excel.worksheet.functions

.

.
 
M

macropod

Hi Joe User,

Re: But as noted in the MSDG Help page: "Every month, Microsoft responds to the suggestions with the most votes".
Taking that at face value, how would you propose that the OP's problem (for which no-one has seen the code) gets to be a suggestion
with the most votes?

--
Cheers
macropod
[Microsoft MVP - Word]


Joe User said:
macropod said:
These newsgroups are user-supported - the help given is generally
not by Microsoft employees


JLatham said:
I realize that, however, in viewing it in the Microsoft discussion forum,
the post is flagged as being a "suggestion for Microsoft".

But as noted in the MSDG Help page: "Every month, Microsoft responds to the suggestions with the most votes".

In all the years that I have read and contributed to the m.p.excel* newsgroups (aka discussion groups), I have never seen a single
response by someone who identified him/herself as an MS employee.

And in this case, I would not blame MS for turning a deaf ear to this "suggestion", which is a problem report at best, and more
likely a user error.


----- original message -----

JLatham said:
I realize that, however, in viewing it in the Microsoft discussion forum, the
post is flagged as being a "suggestion for Microsoft". Thus my comment. In
any case, without seeing code, data and workheet functions, a solution is
going to be very difficult to come up with.

macropod said:
Hi JLatham,

I think that the folks at Microsoft are going to need a copy of the workbook
These newsgroups are user-supported - the help given is generally not by Microsoft employees (and that includes MVPs like me).

--
Cheers
macropod
[Microsoft MVP - Word]


I think that the folks at Microsoft are going to need a copy of the workbook
you're working with to even begin to figure this out. You need to find a
place to make it available on the web and provide a link to it so that
someone can take a look at the code, data, and formulas involved.

:

Update. I tried pasting in blank rows on top of the first group but even
though that changes HOW it processed wrong it still did. The other
(identical records) still process perfectly.

:

Again, I'll apologize as not a coder, I am fixing code I was provided. I
checked and checked and determined somehow that the VBA is WORKING as are my
formulas but somehow it works sometimes and sometimes not. Does anyone have
any idea what could be happening here?

Basically I a have column called ‘Levels’ that determines parenting and
those Levels are derived by an Indenture Formula.

So I have

Level | Name

Which ends up parsing as

Name | Parent

0Main
1>Sub1
1>Sub2
2>>Sub2A
2>>Sub2B
3>>>Sub2BA
3>>>Sub2BB
2>Sub2B

Sub 1 | Main
Sub 2 | Main
Sub2A | Sub2

etc

I was running into errors on the parsing because when it stepped back up
(in this case to Sub2B) it got the wrong parent.

I thought something was wrong with the code that parsed the Level/Name

On a lark I recreated the same data beneath itself but this time I pasted
the Level Values in as Values rather then formulas.

Now the Parent Level Worked.

So I figured ok it is having trouble parsing the code and the formula.

So as a final test I copied the data a third time beneath the non-working
group (with formulas) and the working group (w/o formulas) but pasted
normally, i.e. kept the formulas.

And lo and behold the first group still parsed WRONG, the group with the
fixed values parsed correctly, but the third group with the EXACT same values
AND with the formulas ALSO worked fine.

So I’ve determined that:

The VBA works fine

The Formulas are not a problem

So how could this work sometimes but not others when the values are exactly
the same?

The only difference between the first and last group is the rows they start
on otherwise 100% identical.


----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/com...dg=microsoft.public.excel.worksheet.functions

.
 
J

Joe User

macropod said:
Re: But as noted in the MSDG Help page: "Every month, Microsoft responds
to the suggestions with the most votes". Taking that at face value, how
would
you propose that the OP's problem (for which no-one has seen the code)
gets
to be a suggestion with the most votes?

I think you misunderstood my point. JLatham implied that MS people might
look at the OP's problem when he wrote: "I think that the folks at
Microsoft are going to need a copy of the workbook"; and ``I realize that,
however, in viewing it in the Microsoft discussion forum, the post is
flagged as being a "suggestion for Microsoft".``

My comment was intended to reinforce yours, namely: MS people will not be
looking at OP's problem anyway. First, I doubt the MS people look at these
NGs (DGs) at all. Second, even if they do, I noted that their own
documentation states that they only look at suggestions with "the most
votes". I doubt that anyone would vote for the OP's "suggestions",
especially since it is not a suggestion at all, but a problem report. (And
we all know it is probably a user programming error, not a VBA or Excel
defect.) Since it will not receive any votes (IMHO), there is no way that
it become one of the suggestions with "the most votes".

Ergo, I think you and I are saying the same thing: no matter how you look
at it, there is no way that MS people will look into the OP's problem. I
believe, as you do, that these NGs (DGs) are entirely peer-supported.


----- original message -----

macropod said:
Hi Joe User,

Re: But as noted in the MSDG Help page: "Every month, Microsoft responds
to the suggestions with the most votes".
Taking that at face value, how would you propose that the OP's problem
(for which no-one has seen the code) gets to be a suggestion with the most
votes?

--
Cheers
macropod
[Microsoft MVP - Word]


Joe User said:
macropod said:
These newsgroups are user-supported - the help given is generally
not by Microsoft employees


JLatham said:
I realize that, however, in viewing it in the Microsoft discussion
forum,
the post is flagged as being a "suggestion for Microsoft".

But as noted in the MSDG Help page: "Every month, Microsoft responds to
the suggestions with the most votes".

In all the years that I have read and contributed to the m.p.excel*
newsgroups (aka discussion groups), I have never seen a single response
by someone who identified him/herself as an MS employee.

And in this case, I would not blame MS for turning a deaf ear to this
"suggestion", which is a problem report at best, and more likely a user
error.


----- original message -----

JLatham said:
I realize that, however, in viewing it in the Microsoft discussion forum,
the
post is flagged as being a "suggestion for Microsoft". Thus my comment.
In
any case, without seeing code, data and workheet functions, a solution
is
going to be very difficult to come up with.

:

Hi JLatham,

I think that the folks at Microsoft are going to need a copy of the
workbook
These newsgroups are user-supported - the help given is generally not
by Microsoft employees (and that includes MVPs like me).

--
Cheers
macropod
[Microsoft MVP - Word]


I think that the folks at Microsoft are going to need a copy of the
workbook
you're working with to even begin to figure this out. You need to
find a
place to make it available on the web and provide a link to it so
that
someone can take a look at the code, data, and formulas involved.

:

Update. I tried pasting in blank rows on top of the first group but
even
though that changes HOW it processed wrong it still did. The other
(identical records) still process perfectly.

:

Again, I'll apologize as not a coder, I am fixing code I was
provided. I
checked and checked and determined somehow that the VBA is WORKING
as are my
formulas but somehow it works sometimes and sometimes not. Does
anyone have
any idea what could be happening here?

Basically I a have column called ‘Levels’ that determines
parenting and
those Levels are derived by an Indenture Formula.

So I have

Level | Name

Which ends up parsing as

Name | Parent

0Main
1>Sub1
1>Sub2
2>>Sub2A
2>>Sub2B
3>>>Sub2BA
3>>>Sub2BB
2>Sub2B

Sub 1 | Main
Sub 2 | Main
Sub2A | Sub2

etc

I was running into errors on the parsing because when it stepped
back up
(in this case to Sub2B) it got the wrong parent.

I thought something was wrong with the code that parsed the
Level/Name

On a lark I recreated the same data beneath itself but this time I
pasted
the Level Values in as Values rather then formulas.

Now the Parent Level Worked.

So I figured ok it is having trouble parsing the code and the
formula.

So as a final test I copied the data a third time beneath the
non-working
group (with formulas) and the working group (w/o formulas) but
pasted
normally, i.e. kept the formulas.

And lo and behold the first group still parsed WRONG, the group
with the
fixed values parsed correctly, but the third group with the EXACT
same values
AND with the formulas ALSO worked fine.

So I’ve determined that:

The VBA works fine

The Formulas are not a problem

So how could this work sometimes but not others when the values
are exactly
the same?

The only difference between the first and last group is the rows
they start
on otherwise 100% identical.


----------------
This post is a suggestion for Microsoft, and Microsoft responds to
the
suggestions with the most votes. To vote for this suggestion,
click the "I
Agree" button in the message pane. If you do not see the button,
follow this
link to open the suggestion in the Microsoft Web-based Newsreader
and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/com...dg=microsoft.public.excel.worksheet.functions

.
 

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

Top