+ Reply to Thread
Results 1 to 4 of 4

Simplify formula

  1. #1
    Registered User
    Join Date
    04-30-2008
    Posts
    14

    Simplify formula

    Any help would be appreciated.

    This seems like a simple enough concept to me. I want to compare two values, A8 & C8 to all preceeding sets of values in the given column. If they match any other set, I'd like one value and if they do not I'd like another. In other words, I'd like to identify the first instance of sets within identified columns.

    I can make it work but it seems dirty and instead of 8 test lines I would be looking to extend it down the entire column. Can you help me clean it up?

    =IF(OR(AND(A8=A1,C8=C1),AND(A8=A2,C8=C2),AND(A8=A3,C8=C3),AND(A8=A4,C8=C4),AND(A8=A5,C8=C5,AND(A8=A6,C8=C6),AND(A8=A7,C8=C7))),0,1)

    Thanks for your help.
    Last edited by ShockG; 04-30-2008 at 07:12 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    In C1 (or any column you wish), enter =SUMPRODUCT((A$1:A1=A1) * (B$1:B1=B1) ) > 1 and copy down. It returns True if the same A/B combination has appeared in a prior row.

    Please read the Forum Rules about thread titles before starting your next thread.
    Last edited by shg; 04-30-2008 at 07:55 PM.

  3. #3
    Forum Expert
    Join Date
    12-24-2004
    Location
    Sweden
    Posts
    1,256

    Reply

    I think this should solve your problem:
    =--(SUMPRODUCT(--(A8=A1:A7),--(C8=C1:C7))>0)
    //Ola

  4. #4
    Registered User
    Join Date
    04-30-2008
    Posts
    14
    shg-

    The formula you forwarded worked perfectly but the truth is I don't understand it all. I've followed the link on another thread for a tutorial on sumproduct.

    Thank you for your help. I feel fortunate to have tripped over this site.

    Sorry for the improper title.

+ 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