Hi,
For work I do a monthly text message marketing campaign to accounts on our book that meet certain criteria. To do this I have a lenghty macro which runs tests against our account extract, then creates a calculation sheet to show how many account were excluded for what reason, and finally it highlights all the accounts that meet the criteria for the campaign.
One of the tests in the macro is to see if the cellphone number on our books is a valid number. I used to do this by saying IF the number is 10 characters in length and starts with 07 or 08 then the value is "T", otherwise it is "F". All my subsequent calculations and formulas then use this "T" and "F".
My problem is that now our company has changed the numbers to include international dialling codes. My formula now looks like this:
=AND(OR(AND(LEN(AV3)=15,LEFT(AV3,6)="+27(0)"),AND(LEN(AV3)=16,LEFT(AV3,7)="+264(0)")),ISNUMBER(VALUE(RIGHT(AV3,9))))
So the number is valid when the right 9 characters are numeric, AND when one of the following is true:
length is 15 and 6 left characters are +27(0) OR
length is 16 and 7 left characters are +264(0)
So this works fine but now it gives me "TRUE" or "FALSE" as an answer, which throws out all my other calculations in the macro, which all look for "T" and "F".
Can I edit the above formule so it shows T or F instead of the default True or False?
Please help!
For work I do a monthly text message marketing campaign to accounts on our book that meet certain criteria. To do this I have a lenghty macro which runs tests against our account extract, then creates a calculation sheet to show how many account were excluded for what reason, and finally it highlights all the accounts that meet the criteria for the campaign.
One of the tests in the macro is to see if the cellphone number on our books is a valid number. I used to do this by saying IF the number is 10 characters in length and starts with 07 or 08 then the value is "T", otherwise it is "F". All my subsequent calculations and formulas then use this "T" and "F".
My problem is that now our company has changed the numbers to include international dialling codes. My formula now looks like this:
=AND(OR(AND(LEN(AV3)=15,LEFT(AV3,6)="+27(0)"),AND(LEN(AV3)=16,LEFT(AV3,7)="+264(0)")),ISNUMBER(VALUE(RIGHT(AV3,9))))
So the number is valid when the right 9 characters are numeric, AND when one of the following is true:
length is 15 and 6 left characters are +27(0) OR
length is 16 and 7 left characters are +264(0)
So this works fine but now it gives me "TRUE" or "FALSE" as an answer, which throws out all my other calculations in the macro, which all look for "T" and "F".
Can I edit the above formule so it shows T or F instead of the default True or False?
Please help!