LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 93
Default Weird VBA Behaviour

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
1Sub1
1Sub2
2Sub2A
2Sub2B
3Sub2BA
3Sub2BB
2Sub2B

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 Ive 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/comm...et.f unctions
 
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
Weird WindowsMediaPlayer behaviour teepee[_3_] Excel Discussion (Misc queries) 1 October 26th 08 11:20 PM
Range-name Behaviour Peter Excel Discussion (Misc queries) 3 September 16th 08 10:06 PM
for...next funny behaviour Steve Excel Discussion (Misc queries) 4 June 30th 08 08:06 PM
Excel2000: Weird behaviour in VBA Arvi Laanemets Excel Discussion (Misc queries) 3 February 1st 06 02:14 PM
Excel2000: Weird chart behaviour Arvi Laanemets Excel Discussion (Misc queries) 2 September 6th 05 07:48 AM


All times are GMT +1. The time now is 09:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"