+ Reply to Thread
Results 1 to 7 of 7

Excel 2007 : Formula that will return a value based on the values in multiple cell

  1. #1
    Forum Contributor
    Join Date
    04-14-2008
    Location
    Fort Collins, Co
    MS-Off Ver
    2016
    Posts
    107

    Formula that will return a value based on the values in multiple cell

    My column headers have product names. The rows have the number of each product installed at a specific location.

    I need to return a TRUE value if columns A:L and columns N:AO ALL contain the number 0 AND column M contains a 1.

    I tried an IF AND written like this:
    Please Login or Register  to view this content.
    And I get a #VALUE error.

    Also tried:
    Please Login or Register  to view this content.
    Same #VALUE error

    What am I doing wrong?

    Thanks!!
    Last edited by NBVC; 06-08-2010 at 09:46 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Formula that will return a value based on the values in multiple non-contiguous c

    What do you mean by ALL?

    Are you checking each of those columns within a row? Or do you mean every single cell in the entire columns have 0's in them?...
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Contributor
    Join Date
    04-14-2008
    Location
    Fort Collins, Co
    MS-Off Ver
    2016
    Posts
    107

    Re: Formula that will return a value based on the values in multiple non-contiguous c

    Quote Originally Posted by NBVC View Post
    What do you mean by ALL?

    Are you checking each of those columns within a row? Or do you mean every single cell in the entire columns have 0's in them?...
    I need to test that EACH cell in range F:L has a 0 and EACH cell in range N:AO has a 0 AND that Cell M contains a 1. If all these conditions are met, I need it to return TRUE.

    Thanks

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Formula that will return a value based on the values in multiple non-contiguous c

    I am going to assume you misunderstood me an assume that you are look at a row per row basis (otherwise, you are looking a looking for 65600+ cells * that many number of columsn full of 0's.. which I am not sure that is what you want).

    So, say we are in row 1.

    =AND(SUM(F1:L1)=0,SUM(N1:AO1=0),M1=1)

    will return TRUE if you have 0's or blanks in F1:L1 and N1:A01 and M1 = 1.

    If you absolutely need to look for 0s, then

    =AND(COUNTIF(F1:L1,0)=COLUMNS(F1:L1),COUNTIF(N1:AO1,0)=COLUMNS(N1:AO1)=0,M1=1)

    copied down.

    adjust if first row number is not 1.

    =

  5. #5
    Forum Contributor
    Join Date
    04-14-2008
    Location
    Fort Collins, Co
    MS-Off Ver
    2016
    Posts
    107

    Re: Formula that will return a value based on the values in multiple non-contiguous c

    Thank you, you are correct. But I still get a #VALUE error when trying
    Please Login or Register  to view this content.

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Formula that will return a value based on the values in multiple non-contiguous c

    I put a closing bracket in the wrong place...


    =AND(SUM(F1:L1)=0,SUM(N1:AO1)=0,M1=1)

  7. #7
    Forum Contributor
    Join Date
    04-14-2008
    Location
    Fort Collins, Co
    MS-Off Ver
    2016
    Posts
    107

    Re: Formula that will return a value based on the values in multiple non-contiguous c

    Thank you! Solved!

+ 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