+ Reply to Thread
Results 1 to 7 of 7

question about IF function

  1. #1
    Registered User
    Join Date
    01-16-2008
    Posts
    7

    question about IF function

    I'm trying to write a function that would do the following:

    If two cells in a row are the same as two cells in any row ABOVE that row, then I'd like the cell with the formula to read "False". For example, if the sheet looks like this for columns A through D, and rows 1 through 5, how should I format the cells in column D?

    A B C D

    1 X Y E E
    2 X Z E E
    3 Z X E E
    4 Z Y E E
    5 X Z E FALSE

    Any suggestions? Thanks so much -

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

    Please Login or Register  to view this content.
    formula must be confirmed with CTRL+SHIFT+ENTER not just ENTER...you will see { } brackets appear if entered correctly

    Then copy down.
    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
    Registered User
    Join Date
    01-16-2008
    Posts
    7
    Thank so much for your response!

    Will this work if the cells have text and not numbers?

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Quote Originally Posted by cnow
    Thank so much for your response!

    Will this work if the cells have text and not numbers?
    Yes it will..

    the ISNUMBER() function only checks whether the Match() function comes up with a positive response (which would be a 1 if all three arguments in the lookup_array part of the Match() function are true). When all are true, the three TRUEs multiplied result in a 1.., if not you get 0's. Then the Match() function searches these results to find a 1... If a 1 is found then the position of that 1 is returned and that position itself is a number, that the Isnumber() function will recognize and yield a positive result.

  5. #5
    Registered User
    Join Date
    01-16-2008
    Posts
    7
    Hm...I'm getting "FALSE" when I shouldn't be...but I think I understand your logic...I'm trying to find out what I'm doing wrong...

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    If you can't resolve it...just attach a sample zipped file here and I can take a look.

  7. #7
    Registered User
    Join Date
    01-16-2008
    Posts
    7
    I think I must've mistyped something - because it's working now! Thanks so much - this was a huge help!

+ 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