+ Reply to Thread
Results 1 to 4 of 4

how to over come limit of 7 imbedded if's

  1. #1
    Registered User
    Join Date
    01-27-2006
    Location
    Midlands England
    MS-Off Ver
    97, 2000, 2003
    Posts
    11

    Question how to over come limit of 7 imbedded if's

    There is a limit of 8(?) subsequent If statements within an IF statement. For example
    Please Login or Register  to view this content.
    I am using a Modulus 11 check digit and I need to match 11 possible results so need 11 IF tests. Can anyone suggest how to do it?
    Last edited by wejofost; 08-17-2007 at 03:50 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Wejofost,

    Since you are using MOD 11 math to get the values from 0 to 10, and it looks like you want to return a column letter based on the result, you can simplify your code to this...
    Please Login or Register  to view this content.
    Capital "A" is ASCII value 65. Adding the modulus remainder then indexes you through columns A to J.

    Sincerely,
    Leith Ross

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Try using CHOOSE...

    =CHOOSE(H22+1,"A","B","C","D","E","F".,"G","H","I","J","K")

    replace letters with anything you want

  4. #4
    Registered User
    Join Date
    01-27-2006
    Location
    Midlands England
    MS-Off Ver
    97, 2000, 2003
    Posts
    11

    Smile Thank You. Brilliant response

    To Lieth Ross and daddylonglegs,
    Thank you. Two totally different but fully functional responses. How can I fail to achieve with such excellent support.
    Lieth, your response is simple and shows lateral thinking. Works 100%.

    daddylonglegs use of the CHOOSE function also works 100% and has introduced me to yet another level of functionality in Excel that I was unaware of.

    I plan to use the CHOOSE methodology approach because I am trying to create a "secret" key that cannot be guessed. With my reading of the CHOOSE function I have the ability to specify and vary the sequence of the alpha matching characters which gives me a further level of encryption to deploy.

    Thank you once again.
    Wej Parry

+ 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