+ Reply to Thread
Results 1 to 2 of 2

Same formula but different results in 2 different cells!!

  1. #1
    Registered User
    Join Date
    07-31-2015
    Location
    UK
    MS-Off Ver
    2010
    Posts
    2

    Angry Same formula but different results in 2 different cells!!

    OK so i have the following formula in cell BP152:

    =IF(ISNUMBER(SEARCH("*Fail*",HLOOKUP($BM$2,SortedData,$DB$152,FALSE))),1,IF(ISNUMBER(SEARCH("*RFI*",HLOOKUP($BM$2,SortedData,$DB$152,FALSE))),1,0))

    SortedData is a dynamic name range. DB152 has the row number that the hlookup should look down to. This formula evaluates to 1 as it should. Now i have copied and pasted that forumla to cell BM152 (i copied the formula across by dragging, by copying and pasting the forumla bar, by remove the =sign, copying it as text and pasting it and replacing the equal bar, copying it into word and then into excel.... but no mattter what i try the formula evaluates to 0 when in cell BM152

    i dont understand as the formulas are exactly the same. i have even removed the = sign from both and used =BM152=BP152 which evaluates to TRUE so the formulas are definitely 100% the same. I have tried entering as an array formula, made sure that the spreadsheet is set to auto-calculate (but for fun i set it to manual, calculated and set it back to automatic)..... but still they give different results.

    Anyone have any ideas as to why the exact same formula in 2 different cells can evaluate differently?? And just to show they are the same the following 2 lines are the formulas copies and pasted from their respective cells:

    =IF(ISNUMBER(SEARCH("*Fail*",HLOOKUP($BM$2,SortedData,$DB$152,FALSE))),1,IF(ISNUMBER(SEARCH("*RFI*",HLOOKUP($BM$2,SortedData,$DB$152,FALSE))),1,0)) - excel evaluating this as 1
    =IF(ISNUMBER(SEARCH("*Fail*",HLOOKUP($BM$2,SortedData,$DB$152,FALSE))),1,IF(ISNUMBER(SEARCH("*RFI*",HLOOKUP($BM$2,SortedData,$DB$152,FALSE))),1,0)) - excel evaluating this as 0

    HELP!!!! I am going grey over this!!!
    Last edited by itchybumba; 08-06-2015 at 10:40 AM.

  2. #2
    Registered User
    Join Date
    07-31-2015
    Location
    UK
    MS-Off Ver
    2010
    Posts
    2

    Re: Same formula but different results in 2 different cells!!

    OK so i worked it out, the problem was in the names range where i used this formula

    =OFFSET(Sorted_Data!$A$2,0,0,COUNTA(Sorted_Data!A:A)-1,64)

    What i didnt realise was that depending on what column you were in the counta function would count a different column, despite me never dragging the named range around.

    Changing that formula to =OFFSET(Sorted_Data!$A$2,0,0,COUNTA(Sorted_Data!$A:$A)-1,64) sorted the problem.

    Sorry to have wasted anybodies time!

+ 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. Sort Cells that contain Formula results need blank cells at the bottom
    By Vicious00013 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-26-2014, 09:08 PM
  2. [SOLVED] Return non-blank cells from range AND ignore cells with only formula w/o results
    By grafitti in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-06-2014, 08:15 AM
  3. Formula results overflow on the next blank cells (with formula)
    By Javidk in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-09-2013, 05:37 AM
  4. [SOLVED] Help with NOW() Formula to vary results in different cells
    By nenadmail in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-29-2012, 04:28 PM
  5. Cells don't display formula results
    By Frankf in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-04-2010, 02:50 PM
  6. Macro that copies results from formula cells but not the formula itself???
    By jermsalerms in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-11-2006, 11:40 AM
  7. Cells displays formula, not results
    By synaptic5150 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-19-2005, 06:06 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