lizzie Posted July 4, 2007 Posted July 4, 2007 My records are made up of the fields N1 to N6. Is there any way that I can calculate how many pairs of numbers there are i.e. 11 / 12 or 34 / 35 etc One would thus be identifying consecutive numbers. . .
The Shadow Posted July 5, 2007 Posted July 5, 2007 Here's one way I came up with: ( ValueCount( FilterValues( List(n2;n3;n4;n5;n6); List(n1-1; n1; n1+1) ) ) + ValueCount( FilterValues( List(n1;n3;n4;n5;n6); List(n2-1; n2; n2+1) ) ) + ValueCount( FilterValues( List(n1;n2;n4;n5;n6); List(n3-1; n3; n3+1) ) ) + ValueCount( FilterValues( List(n1;n2;n3;n5;n6); List(n4-1; n4; n4+1) ) ) + ValueCount( FilterValues( List(n1;n2;n3;n4;n6); List(n5-1; n5; n5+1) ) ) + ValueCount( FilterValues( List(n1;n2;n4;n4;n5); List(n6-1; n6; n6+1) ) ) ) / 2 This counts an exact match with another number as a pair also.
Recommended Posts
This topic is 6412 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now