Results 1 to 7 of 7

Multiple IF with AND formula, but One of the options is not returning correct outcome

Threaded View

evenflowd Multiple IF with AND formula,... 03-19-2021, 10:46 AM
Glenn Kennedy Re: Multiple IF with AND... 03-19-2021, 10:55 AM
evenflowd Re: Multiple IF with AND... 03-19-2021, 11:00 AM
Fluff13 Re: Multiple IF with AND... 03-19-2021, 10:56 AM
evenflowd Re: Multiple IF with AND... 03-19-2021, 11:00 AM
Glenn Kennedy Re: Multiple IF with AND... 03-19-2021, 11:01 AM
Fluff13 Re: Multiple IF with AND... 03-19-2021, 11:35 AM
  1. #1
    Registered User
    Join Date
    03-19-2021
    Location
    London
    MS-Off Ver
    16.16.27
    Posts
    3

    Question Multiple IF with AND formula, but One of the options is not returning correct outcome

    Hi All,

    Hope someone can help, I really cannot see where I am going wrong here.

    I am trying to get a score of either "2", "1", or "0" in column C, depending on entry in both columns A and B, as below:

    If A=Long, and B=Uptrend, then C=2
    If A=Long, and B=Sidetrend, then C=1
    If A=Long, and B=Downtrend, then C=0
    If A=Short, and B=Uptrend, then C=0
    If A=Short, and B=Sidetrend, then C=1
    If A=Short, and B=Downtrend, then C=2

    Using the following formula:

    Formula: copy to clipboard
    =IF(B2="Sidetrend",1,IF(AND(A2="Long",B2="Uptrend"),2,IF(AND(A2="Short",B2="Downtrend"),2,0)))  


    I am getting the correct outcome for all, except: A=Short, and B=Downtrend, which is returning "0"

    Any help would be appreciated as I am stumped.

    Workbook attached.

    Thanks in advance!
    Attached Files Attached Files
    Last edited by evenflowd; 03-19-2021 at 11:01 AM. Reason: SOLVED

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] IF Formula Looking at a Range of Cells to Figure Out Correct Outcome by Shifting Rows
    By meseleto in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-17-2019, 09:20 PM
  2. [SOLVED] Formula to choose outcome from series of options
    By archana89 in forum Excel General
    Replies: 6
    Last Post: 03-17-2019, 02:04 PM
  3. IF Formula not returning correct value
    By arpanpanchal in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-20-2018, 03:17 AM
  4. [SOLVED] formula not returning the correct value
    By dmcgov in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-23-2016, 02:24 PM
  5. [SOLVED] "If" formula not bringing up correct outcome
    By joamer in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 11-08-2014, 01:25 PM
  6. Macro to correct formula outcome
    By pinas in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-21-2012, 12:10 AM
  7. Formula sometimes returning correct answer and sometimes returning 0
    By redimp in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-09-2010, 06:28 AM

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