+ Reply to Thread
Results 1 to 13 of 13

IF function multiple criteria

  1. #1
    Forum Contributor
    Join Date
    02-01-2011
    Location
    london, england
    MS-Off Ver
    Excel 2016
    Posts
    179

    IF function multiple criteria

    hi guys,

    statement basically needs to say if cell a1 = "certain phrase" AND B1 is populated then return value in B1.

    can't seem to get my IFs and ANDs right :/

    can anyone help please?

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: IF function multiple criteria

    What about the else? What if B1 is not populated, what do you want as the answer?

  3. #3
    Forum Contributor
    Join Date
    02-01-2011
    Location
    london, england
    MS-Off Ver
    Excel 2016
    Posts
    179

    Re: IF function multiple criteria

    "" - this would leave it blank yes?

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: IF function multiple criteria

    Your formula should be
    =IF(AND(A1="certain phrase",B1<>""),B1,"")

  5. #5
    Forum Contributor
    Join Date
    02-01-2011
    Location
    london, england
    MS-Off Ver
    Excel 2016
    Posts
    179

    Re: IF function multiple criteria

    thank you very much for your swift help! can i adapt this for column refs instead of cell references?

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: IF function multiple criteria

    You are welcome. I dont think so. But you can drag the formula down to how many ever rows you need and it will take the respective row references.

  7. #7
    Forum Contributor
    Join Date
    02-01-2011
    Location
    london, england
    MS-Off Ver
    Excel 2016
    Posts
    179

    Re: IF function multiple criteria

    hmmm, may not have asked for what i needed then!!

    i've uploaded a scaled down version of what i'm working on.

    i want my formula to say if column A on sheet 2 matches column A on sheet 1 AND column K on sheet 2 is populated, then return value of column K. Sorry to be a nuisance, thought i'd try and simplify things and have ended up complicating them!!
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    02-01-2011
    Location
    london, england
    MS-Off Ver
    Excel 2016
    Posts
    179

    Re: IF function multiple criteria

    can anyone help?

  9. #9
    Forum Contributor
    Join Date
    08-01-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2007
    Posts
    182

    Re: IF function multiple criteria

    We can use a simple vlookup formula. But my understanding is that in column A of sheet 2 a data value from Column A 1 may come more than 1 time. Example. "AUDIO" may have 2 orders and may come in row 5 and row 9. If the Column A data comes only once then we can use vlookup. Is there anything else that we need to match.
    vlookup formula

    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    02-01-2011
    Location
    london, england
    MS-Off Ver
    Excel 2016
    Posts
    179

    Re: IF function multiple criteria

    hmm, formula is returning #NAME? error? thanks for your persistence with this, i think understand how the vlookup is working and yes, i think it will give me what i need without matching anything else.

    EDIT: sorry, yes, data will be repeated in column a of sheet 2, but will not be repeated in column a of sheet 1

  11. #11
    Forum Contributor
    Join Date
    02-01-2011
    Location
    london, england
    MS-Off Ver
    Excel 2016
    Posts
    179

    Re: IF function multiple criteria

    Please Login or Register  to view this content.
    I've used the above and i think it works, it's returning N/A for when column K isn't populated which is a bit annoying but maybe i can live with it...

  12. #12
    Forum Contributor
    Join Date
    08-01-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2007
    Posts
    182

    Re: IF function multiple criteria

    it is not giving me any error. Attached is the sheet.

    However I was wondering what is the use of the sheet. You said that the data may be repeated in Sheet 2. So vlookup will only give you the first instance of that data in the sheet. What about the second instance. I have highlighted what I am trying to say in the attached sheet
    Attached Files Attached Files

  13. #13
    Forum Contributor
    Join Date
    02-01-2011
    Location
    london, england
    MS-Off Ver
    Excel 2016
    Posts
    179

    Re: IF function multiple criteria

    Thanks for all of your help inayat, that's sorted it!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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