Share via

Function for Numerals in Order

Anonymous
2024-10-29T09:20:44+00:00

Thank You for all previous assistance, and I hope all are well. I have yet another question. Is there a function that can tell us whether or not the numerals in a multiple digit number all appear in order of value or reverse order ? For example, say I have 987654321 - this is fine. But any other arrangement, except for reversing it completely will be wrong. What I mean is to be able to determine that if a given numeral appears, in my case the one following it may only be equal to less to it in value. Thus, 53210 is fine, but not 23501, and so on. This was to do with the arrangements of the wins in sports tournament pools, where the team having the most wins is listed first, then those with equal to or less than that. Of course, if one has for instance seven teams, each plays all of the six other teams, and there are no draws nor ties, then there will be 21 games, because it takes two to tango. Seven times six is 42, but of course team A playing team D is the same as D playing A, so those cancel out. Then the most any team can win is six games, but only one team can do that. If anyone has any ideas, go raibh maith agat.

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

3 answers

Sort by: Most helpful
  1. Anonymous
    2024-10-29T21:35:09+00:00

    I have tried this, but it does not seem to work, and I might have done it wrong. How should I do this ? And what will it show ? I first selected another cell, then pasted this code into the formula box, but it came up with the NAME error. Sorry.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2024-10-29T21:23:22+00:00

    Thank You for that - I shall check it out, and get back to You to say whether it succeeded.

    Was this answer helpful?

    0 comments No comments
  3. Rory Archibald 18,965 Reputation points Volunteer Moderator
    2024-10-29T09:29:00+00:00

    You could use something like:

    =LET(d,A1,s,SEQUENCE(LEN(d)-1),OR(AND(MID(d,s,1)>MID(d,s+1,1)),AND(MID(d,s,1)<MID(d,s+1,1))))

    where A1 has the value to check.

    Was this answer helpful?

    0 comments No comments