+ Reply to Thread
Results 1 to 2 of 2

IF AND function with a condition where a range is equal to a text value

  1. #1
    Registered User
    Join Date
    12-03-2020
    Location
    New York, NY
    MS-Off Ver
    2013
    Posts
    12

    IF AND function with a condition where a range is equal to a text value

    Hello!

    I'm sorry if my title doesn't make any sense - I don't exactly know how to explain what I'm trying to do. But basically, you know how if you do a SUMIF function, you can say "for any row in range XX:XX where a cell is equal to "text", add up range YY:YY" (ex: =SUMIF($B$4:$B$679,"Corn",CC4:CC678)? I want to do a similar thing with IF AND, but with another condition and without the adding. So in normal terms I would want "if DA4 matches $A$4:$A$678, AND $B$4:$B$678 shows the word "Corn" then return "M"" THIS IS THE FUNCTION I'M USING =IF(AND(MATCH(DA4,$A$4:$A$678),($B$4:$B$678,"Corn","")),"M","")

    The first part (the MATCH part) works fine, but it's the part after that that's having trouble. I'm doing it like this $B$4:$B$678,"Corn","" instead of like this $B$4:$B$678="Corn", because the SUMIF function does it with commas. But I also tried it with and equal sign and it still didn't work.

    I hope some of this makes sense. I really appreciate the help!
    Attached Files Attached Files
    Last edited by ejb1986; 12-03-2020 at 07:16 PM. Reason: Attaching example

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,553

    Re: IF AND function with a condition where a range is equal to a text value

    See the yellow banner at the top of the screen.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ 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. Using greater than or equal to function for a range of cells.
    By chkn89 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-27-2020, 03:12 PM
  2. [SOLVED] Sumif if range does not equal any text in a range
    By Luigi802 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 12-20-2019, 09:12 AM
  3. [SOLVED] Sumifs not equal to more than one condition in the same range
    By jomili in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-29-2016, 02:53 PM
  4. Perform macro on Condition - If it is equal to specific value in a cell range
    By Sivashanmugam in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-04-2015, 04:08 AM
  5. [SOLVED] IF text string is equal left characters and DDMM of DOB is outside a range.
    By DaveBre in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 05-07-2014, 06:53 PM
  6. [SOLVED] Cond. formatting a column/Range, highlight cell in column/range if equal to specific text
    By DFrank231 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-19-2013, 03:35 PM
  7. Replies: 3
    Last Post: 12-12-2012, 12:30 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