+ Reply to Thread
Results 1 to 4 of 4

Lookup Formula Breaks

Hybrid View

  1. #1
    Registered User
    Join Date
    10-12-2006
    Posts
    3

    Lookup Formula Breaks

    I have a formula that works fine in the spreadsheet. However when my Visual Basic Application opens the file and saves it as a new file, the formula no longer works. I'm wondering if its because the formula isn't written the best way.
    This looks up the max value in Column E (column of numbers that are not sorted), and returns the value in same row in column A. Works great, but after the app runs, it returns the highest value in column A instead.
    =LOOKUP(MAX(E2:E82), E2:E82, A2:A82)

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by ajvb
    I have a formula that works fine in the spreadsheet. However when my Visual Basic Application opens the file and saves it as a new file, the formula no longer works. I'm wondering if its because the formula isn't written the best way.
    This looks up the max value in Column E (column of numbers that are not sorted), and returns the value in same row in column A. Works great, but after the app runs, it returns the highest value in column A instead.
    =LOOKUP(MAX(E2:E82), E2:E82, A2:A82)
    Formula appears ok - did you try Tools, Formula Auditing, Evaluate and step through to see what was happening? (not that Lookup shows much)

    Did you press F9 ?
    (ie, have you flipped to 'Manual calc'?
    (did you suppress ScreenUpdating or EnableEvents?)
    ---

  3. #3
    Registered User
    Join Date
    10-12-2006
    Posts
    3

    Excel does not like this

    I haven't slipped into manual as far as I can tell .
    Here's what is happening as I look closer:
    If I enter numbers in Column E, the formula correctly displays the results that I want.
    If I enter any "0's" in Column E, the formula breaks. Sometimes users don't score certain rounds so they get 0 until they score. If I "Clear Contents" the results correctly display again.

  4. #4
    Registered User
    Join Date
    10-12-2006
    Posts
    3

    Lookup formula breaks

    Ok, I think I found it. When I check "Transition Formula Evaluation" in the Options, the problem goes away.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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