Assuming your Custom field is "ABN" (API Name = "ABN__c") then you can stuff this formula in a validation rule to ensure that ABNs entered are valid by using the same logic the government does . not(and ( LEN(TRIM( ABN__c )) == 11, ISNUMBER(ABN__c), mod( (((VALUE(MID(ABN__c, 1, 1)) - 1 ) * 10) + (VALUE(MID(ABN__c, 2, 1)) * 1) + (VALUE(MID(ABN__c, 3, 1)) * 3) + (VALUE(MID(ABN__c, 4, 1)) * 5) + (VALUE(MID(ABN__c, 5, 1)) * 7) + (VALUE(MID(ABN__c, 6, 1)) * 9) + (VALUE(MID(ABN__c, 7, 1)) * 11) + (VALUE(MID(ABN__c, 8, 1)) * 13) + (VALUE(MID(ABN__c, 9, 1)) * 15) + (VALUE(MID(ABN__c, 10, 1)) * 17) + (VALUE(MID(ABN__c, 11, 1)) * 19)), 89 ) == 0 ))
Do you have a recipe on your Mum's Davison Plum Duff that I can post? Great name!!
ReplyDeletehttp://www.gordonramsayrecipe.com/
ReplyDeleteFame and fortune must surely soon be yours Fosnez.... or your Mum's? It may be an idea to work on your profanities though!
This seems to have generated most of my site traffic today. How it got there have no idea ...