+ Reply to Thread
Results 1 to 5 of 5

OR function not working

  1. #1
    Registered User
    Join Date
    10-10-2013
    Location
    Florida
    MS-Off Ver
    Excel 2010
    Posts
    7

    OR function not working

    I am trying to get this function to work:

    =IF(AND(E65<$E$17,$A$17="yes"),(IFERROR(OFFSET(E67,,-$B$17,,),0))*$D$9+(IFERROR(OFFSET(E68,,-$B$17,,),0))*$D$10,0)

    E17 has a value of 30 (from a dropdown list that has the options 30 and 60).

    Row 65, as referred to in "E65" here, has a count of 1 to 365.

    $A$17 has a drop-down list of either yes or no.

    The problem is the formula above continues to return a value of 0 for everthing (even when I have yes selected in A17 and E65 is less than E17).

    Any ideas what could be going on here? I can provide more info if needed.

    Thanks in advance.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: OR function not working

    It's hard to know without knowing what you have in B17, D9, D10 and row 67 and 68......

    Have you tried formula evaluation to find where the problem is, perhaps the AND part returns FALSE?

    If you can't find the problem then please attach your workbook or a representative sample
    Audere est facere

  3. #3
    Registered User
    Join Date
    10-10-2013
    Location
    Florida
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: OR function not working

    To make it easier to isolate the problem, I have removed the formulas in "value if true" and replaced it with 33. The formula is still returning 0 even though A17=yes and E65=4 and E17=30:

    =IF(AND(E65<$E$17,$A$17="yes"),33,0)

    That still returned 0.

    I then changed E65 to E108 in the formula and put the same value there and it worked. It seems that because the 65 row is the header of a table that this formula wasn't in I couldn't refer to it. Just learned something new.

    Thanks for your help.

  4. #4
    Registered User
    Join Date
    10-10-2013
    Location
    Florida
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: OR function not working

    Actually, I expanded the table to include that row and it still isn't using the value in E65. What's strange is I'm successfully doing comparisons with that number in other parts of the worksheet.

  5. #5
    Registered User
    Join Date
    10-10-2013
    Location
    Florida
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: OR function not working

    I've read now that table headers are referred to as text strings. Ok, now it makes sense why this wasn't working.

+ 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. Excel Match Function not working with Right function.
    By swap579579 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-16-2013, 09:00 PM
  2. [SOLVED] Using the Split function with another function incorporated is not working correctly
    By highlystrung in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-06-2013, 03:51 PM
  3. MATCH function within INDIRECT function not working
    By mgerada in forum Excel General
    Replies: 2
    Last Post: 09-04-2011, 08:37 AM
  4. Replies: 4
    Last Post: 12-21-2010, 04:34 PM
  5. Working with Arrays, pasing from function to function
    By mikebres in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-27-2006, 01:40 PM

Tags for this Thread

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