+ Reply to Thread
Results 1 to 12 of 12

formula"IF (cell a) is not "A" or 'B", then see IF (cel b) is blank and thenreturn 0 or 10

  1. #1
    Registered User
    Join Date
    10-30-2012
    Location
    amsterdam
    MS-Off Ver
    Excel 2010
    Posts
    15

    formula"IF (cell a) is not "A" or 'B", then see IF (cel b) is blank and thenreturn 0 or 10

    Hi ,

    I'm struggling creating the right formula.

    I have a table that contains a capacity overview (A) of people in the team.
    in column B, I have the names of people
    in column C, D, E etc I have planned projects per week

    I have a shadow tabel that looks at planned projects and let's me know what my actual capacity(B) is per week( 10 per person) with the following formula:
    =IF(ISBLANK(b2);"0";"10")

    which works fine.

    However, sometimes, column B contains two people that I do want to see in my overview(A), but should not be counted in my capacity(B), and therefore do nto count as '10', but as "0",

    I've tried something like this:
    =if(isblank(b32);if(or(C32<>”Tim”,b32<>”Ronald”);"0";"10"))

    I know the above is wrong as I have not stated the part where 'ronald and tim count as "0", but where to insert it??



    can someone enlighten me please?
    Attached Files Attached Files
    Last edited by pallie; 10-07-2014 at 09:35 AM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: formula"IF (cell a) is not "A" or 'B", then see IF (cel b) is blank and thenreturn 0 o

    Hi,

    Are you able to upload the workbook and manually add some examples of results you expect to see. These things are often easier and quicker to figure out if we can see the request in context.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Valued Forum Contributor
    Join Date
    01-19-2012
    Location
    Barrington, IL
    MS-Off Ver
    Excel 2007/2010
    Posts
    1,211

    Re: formula"IF (cell a) is not "A" or 'B", then see IF (cel b) is blank and thenreturn 0 o

    Just looking at the formula, the FALSE clause for the first if is not present

    =IF(ISBLANK(B32),IF(OR(C32<>”Tim”,B32<>”Ronald”),0,10),WhatHappensWhenB32IsNotBlank?)
    You should hit F5, because chances are I've edited this post at least 5 times.
    Example of Array Formulas
    Quote Originally Posted by Jacc View Post
    Sorry, your description makes no sense. I just made some formula that looks interesting cause I had nothing else to do.
    Click the * below on any post that helped you.

  4. #4
    Valued Forum Contributor
    Join Date
    01-19-2012
    Location
    Barrington, IL
    MS-Off Ver
    Excel 2007/2010
    Posts
    1,211

    Re: formula"IF (cell a) is not "A" or 'B", then see IF (cel b) is blank and thenreturn 0 o

    Blue would be the test, Green is what happens if TRUE, red happens if FALSE.

    The reason you are getting errors with this syntax, is the second (green) if will only happen if B32 is blank, or the Blue IF test returns TRUE. I think you meant to have the GREEN test occur only if B32 is NOT blank?

    Try changing the structure to

    =IF(B32="","",IF(OR(NOT(C32="Tim"),NOT(B32="Ronald")),0,10))

  5. #5
    Registered User
    Join Date
    10-30-2012
    Location
    amsterdam
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: formula"IF (cell a) is not "A" or 'B", then see IF (cel b) is blank and thenreturn 0 o

    Richard, I have it attached now , have a look at red cell AF 32
    Lats thing I tried was:
    =if(or(b25<>”kwaliteit”, b25<>”Ronald”; (ISBLANK(C28);"0";"10");”0”,”0”))

    ( I know, I'm just randomly putting () somewhere in the hope it works..

    @Speshul, I know I was missing it, i just have no clue how to combine the two things:
    1. stating that if cell b32 is not 'ronald'or 'kwaliteit it should ignore statement 2 and no nothing
    2. stating that if cell c32 is blank, put 0 in it, if isn't, count as 10.

  6. #6
    Valued Forum Contributor
    Join Date
    01-19-2012
    Location
    Barrington, IL
    MS-Off Ver
    Excel 2007/2010
    Posts
    1,211

    Re: formula"IF (cell a) is not "A" or 'B", then see IF (cel b) is blank and thenreturn 0 o

    1. stating that if cell b32 is not 'ronald'or 'kwaliteit it should ignore statement 2 and no nothing
    2. stating that if cell c32 is blank, put 0 in it, if isn't, count as 10.


    Like this?

    =IF(NOT(OR(B32="ronald",B32="frank",B32="somethingelse")),"",IF(C32="",0,"10"))

  7. #7
    Registered User
    Join Date
    10-30-2012
    Location
    amsterdam
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: formula"IF (cell a) is not "A" or 'B", then see IF (cel b) is blank and thenreturn 0 o

    Hi Speshul,

    Doesn't work I'm afraid , gives an error, I changed to:
    =IF(C32="","",IF(OR(NOT(B32="Tim"),NOT(B32="Ronald")),0,10))

    because 'tim' or 'ronald' are to be found in the same cell, and the blank value in the other.
    but it just gives me an error..

    ( BTW in my attachment, the blue table in B24:Z37 contains all values "0", those should be cleared in order for this to work naturally.

  8. #8
    Registered User
    Join Date
    10-30-2012
    Location
    amsterdam
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: formula"IF (cell a) is not "A" or 'B", then see IF (cel b) is blank and thenreturn 0 o

    Speshul:
    ALMOST!
    I changed it to:
    =IF(NOT(OR(B32="ronald";B32="kwaliteit"));"";IF(C32="";10;"0"))

    as it returned '10'with 'ronald' int he way you formulated it

    however, now I need to incorporate the 'somethingelse'part,whereby the 10;0 part is then turned around so that it gives 10 WITH a value in cell c 32, and 0 without a value in cel 32

  9. #9
    Valued Forum Contributor
    Join Date
    01-19-2012
    Location
    Barrington, IL
    MS-Off Ver
    Excel 2007/2010
    Posts
    1,211

    Re: formula"IF (cell a) is not "A" or 'B", then see IF (cel b) is blank and thenreturn 0 o

    I'll break your formula down a bit so you can see exactly what's happening in each part, and maybe figure out the solution. I'm a little confused on the end result expected
    Your formula;
    =IF(NOT(OR(B32="ronald";B32="kwaliteit"));"";IF(C32="";10;"0"))

    Breakdown;
    =IF(
    (B32="ronald";B32="kwaliteit") <------ will return TRUE or FALSE, if either condition is met, B32 = "ronald" will be TRUE if B32 is ronald

    The NOT() around the OR statement NOT(OR(....)) will invert it, so TRUE becomes FALSE and FALSE becomes TRUE. This effectively says "return TRUE in all cases EXCEPT if B32 is 'ronald' or 'kwaliteit'

    If the previous test results in a TRUE, then "" (leave the cell Blank)

    If the test results in a FALSE, then start another test on cell C32.

    IF(C32="";10;"0")
    If C32 is completely blank, return 10, otherwise return 0

  10. #10
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: formula"IF (cell a) is not "A" or 'B", then see IF (cel b) is blank and thenreturn 0 o

    Quote Originally Posted by pallie View Post
    Richard, I have it attached now , have a look at red cell AF 32
    Hi,

    Maybe

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    10-30-2012
    Location
    amsterdam
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: formula"IF (cell a) is not "A" or 'B", then see IF (cel b) is blank and thenreturn 0 o

    oh crap, sorry i meant:
    statement 1: stating that if cell b32 IS 'ronald'or 'kwaliteit it should ignore statement 2 and no nothing
    statement 2: stating that if cell c32 is blank, put 0 in it, if isn't, count as 10.

  12. #12
    Registered User
    Join Date
    10-30-2012
    Location
    amsterdam
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: formula"IF (cell a) is not "A" or 'B", then see IF (cel b) is blank and thenreturn 0 o

    Richard Hero!
    it works!

    thanks both for the GREAT help!

+ 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: 4
    Last Post: 11-17-2013, 12:05 PM
  2. solution for the blank cell using the IF function
    By ragnaedge in forum Excel General
    Replies: 4
    Last Post: 08-23-2013, 11:03 AM
  3. Replies: 3
    Last Post: 02-16-2011, 02:55 PM
  4. Replies: 5
    Last Post: 10-12-2010, 06:46 AM
  5. Replies: 3
    Last Post: 12-14-2006, 01:36 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