+ Reply to Thread
Results 1 to 10 of 10

I think I broke the GoTo function?

  1. #1
    Forum Contributor
    Join Date
    07-30-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    476

    I think I broke the GoTo function?

    Hi,

    I'm not sure how, but my macro seems to be jacking up the GoTo function some how. A1 won't go anywhere and then any other lookup or cell reference appears to be doing some kind of offset.

    I have a pretty big interconnected workbook, I cannot disentangle easily and cannot post publicly, but the functions / methods I'm using that could potentially cause issue are:

    Application.Convertformula - converting A1 formulas to R1C1 in order to push into the Name manager

    I use the EVALUATE function in name manager and I have a SUMIFS that cuts accross ranges that would otherwise cause a circular reference

    Please let me know if you have any thoughts?

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: I think I broke the GoTo function?

    That whole post is pretty cryptic, cmore.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Contributor
    Join Date
    07-30-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    476

    Re: I think I broke the GoTo function?

    Sorry sir. Not sure how to explain further. So for some reason. I run this code. It runs fine, but the F5 and GoTo are jacked up. If I hit A1 it goes nowhere and A14 it offsets 14 cells downward. It's assuming, Some how the cell I reference in Application.Convertformula has reset as the reference of A1 for the GoTo function.

    If I type A1 in the 'NameBox' in the top left corner though, it behaves as expected

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: I think I broke the GoTo function?

    Post an example of the code and data that sends the selection to the wrong place, cmore.

  5. #5
    Forum Contributor
    Join Date
    07-30-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    476

    Re: I think I broke the GoTo function?

    Sorry sir, so it's not that straightforward. I use Covertformula several times and it's a lot of code not sure when/why it's Excel is being thrown off. Here's an example of the Convertformula?

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    07-30-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    476

    Re: I think I broke the GoTo function?

    This formula is basically a dynamic named range based on the location of the cell with a range.

  7. #7
    Forum Contributor
    Join Date
    07-30-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    476

    Re: I think I broke the GoTo function?

    So when I run the code now, somewhere in there the "GoTo" is broken, if I close and reopen it works as intended

  8. #8
    Forum Expert
    Join Date
    04-01-2013
    Location
    East Auckland
    MS-Off Ver
    Excel 365
    Posts
    1,347

    Re: I think I broke the GoTo function?

    what do you mean by "cannot disentangle easily"?
    All we would need is a simplified worksheet that still exhibits the problem. So you might start by breaking all the external links and deleting sheets and deleting data and modules as long as they don't fix the problem. It sounds like you even know the macro that breaks it...

  9. #9
    Forum Contributor
    Join Date
    07-30-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    476

    Re: I think I broke the GoTo function?

    So the code is a workbook that writes named ranges, formulas and creates sheets based on an input sheet. So it's not something where I can just show a piece of it and things make any kind of useful sense. You're right, I cannot really tell where exactly the GoTo goes haywire.

    The only thing that would make sense to me is that the Application.Convertformula is throwing things off somehow or maybe (longshot) because I'm using the EVALUATE function in the named range and excel doesn't like it used too much as there's some weird behaviour that occurs when I use it in conjunction with the Index Function.

    When I step through the code though I don't see the instance where this behaviour is initiated. So I guess I'm wondering if anyone has seen this kind of strangeness before with the GoTo?

  10. #10
    Forum Contributor
    Join Date
    07-30-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    476

    Re: I think I broke the GoTo function?

    I cannot say I've solved the problem, but it's not an issue anymore. What I've done is eliminate any redundant uses of Application.Convertformula, so there were instances where I used it to write formulas to the sheet or array formulas. Instead I just used the .Formula property.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. goto function
    By jbrandon in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-13-2010, 12:32 PM
  2. GOTO Function...
    By Prax in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-07-2007, 12:16 PM
  3. Goto statement in an IF function
    By =\ in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 PM
  4. Goto statement in an IF function
    By Gary L Brown in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 04:05 AM
  5. [SOLVED] Goto statement in an IF function
    By =\ in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM
  6. [SOLVED] Goto statement in an IF function
    By =\ in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM
  7. Goto statement in an IF function
    By =\ in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-11-2005, 02:05 PM
  8. [SOLVED] goto function
    By Ray in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 08-07-2005, 07:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1