+ Reply to Thread
Results 1 to 6 of 6

IF function with 2 conditions

  1. #1
    Registered User
    Join Date
    01-07-2012
    Location
    Florida
    MS-Off Ver
    Excel 2010
    Posts
    5

    IF function with 2 conditions

    I'm trying to create an IF function that has two conditions, where if both of them are true it displays 3, and if either of them is false it displays 0.

    My two conditions are cell value >=1, and cell is has a fill color.

    I've got the first half down and working, but I can't figure out how to logic out if the cell has a background fill.

    Anyone have an answer for this?

    Thanks!


    What I've got so far: =IF(U8>=1,3,0)
    I've tried AND and CELL, but I'm pretty sure I was doing it wrong. I kept getting #NAME errors.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: IF function with 2 conditions

    Is your cell color made by hand or by conditional formatting?

  3. #3
    Registered User
    Join Date
    01-07-2012
    Location
    Florida
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: IF function with 2 conditions

    It's filled in by hand - I'm actually making a spreadsheet for my Pathfinder character - I've colored all the skills that are class skills green. You get a bonus for that, so I'm trying to make a formula that will identify if a skill is a class skill or not when you put ranks in it.


    pathfinderExcel.jpg


    The purpose of this spreadsheet is so I don't have to keep erasing and re-filling in little tiny boxes on the paper and end up with a huge mess, and I'll have enough room and spaces to fill in any extra info, and it will all update itself!

    If you want me to upload a link to a file for a better look, I'll try to do that on dropbox or something.
    Last edited by mishii; 01-07-2012 at 05:01 PM.

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: IF function with 2 conditions

    Try this UDF function.

    In some cell (in example A1) define color and minimum value, then use function =SumByColor($A$1;A3:O3)

    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-07-2012
    Location
    Florida
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: IF function with 2 conditions

    I'm not sure what that is - I'm not very fluent with functions, I just know enough on how to use some of the basic functions in a few different ways.

    How do I apply that to my existing spreadsheet?

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: IF function with 2 conditions

    Copy above function
    Go to excel, press Alt+F11
    Paste it

    Then go to the cell where you want to put formula (like any other formula), start writing =SUMBY... end you would be able to choose it.

    Then select values as exampled above: $A$1 (or any other cell) where is defined your color you want to sum and minimum value and range you want to sum

+ 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