+ Reply to Thread
Results 1 to 4 of 4

how to check if a cell value matches both criteria from the same range

  1. #1
    Registered User
    Join Date
    02-03-2017
    Location
    London
    MS-Off Ver
    2016
    Posts
    1

    how to check if a cell value matches both criteria from the same range

    Hi everyone!

    I was wondering if someone could help me figure out the formula for the following.
    I am trying to find all cases, where a currency pair from the column B (see attached file) matches both 'buy' and 'sell' parametres from the column A. If this criteria is met, the Result (column C) is 'YES', otherwise 'NO'.

    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,481

    Re: how to check if a cell value matches both criteria from the same range

    Normally, buy-usdjpy and sell-usdjpy makes pair.

    But, is it the case of buy-usdgbp and buy-gbpusd makes pair?
    Quang PT

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,258

    Re: how to check if a cell value matches both criteria from the same range

    Try

    =IF(A2="buy",IF(AND(A3="sell",B2=B3),"yes","no"),IF(A2="Sell",IF(AND(A1="Buy",B1=B2),"yes",IF(AND(A3="Buy",B2=B3),"yes","no"))))

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,481

    Re: how to check if a cell value matches both criteria from the same range

    try array formula:

    Please Login or Register  to view this content.
    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

    Drag down

+ 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. Replies: 5
    Last Post: 10-03-2016, 03:39 AM
  2. Check if a cell matches string and take value from the adjacent cell
    By iyoossaev in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-18-2016, 07:52 AM
  3. Check the value in Textbox and value in cell of excel file - If matches
    By prabhuduraraj09 in forum Access Programming / VBA / Macros
    Replies: 1
    Last Post: 06-22-2015, 07:09 AM
  4. Replies: 2
    Last Post: 11-27-2014, 02:48 PM
  5. How to check if text matches any cell i spreadsheet
    By andrea.tylen in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-27-2013, 10:19 AM
  6. Take average of a row that matches criteria of another cell
    By smockpuv in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-15-2013, 02:49 PM
  7. Replies: 6
    Last Post: 09-12-2011, 12:51 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