Chelsea0270516
New Member
- Joined
- Oct 15, 2015
- Messages
- 32
Hello!
My goal is to filter through some three/four digit IDs. Any three digit ones need to be ignored. Any that end with a 1,2,3, or 9 need special attention. Those numbers need to drop the last digit.
Sample: 2309 needs to become 230
I have a nested IF statement that isn't working. Normally I don't have issues with the logic in them but I can't see why this wouldn't work.
First I test for the 3 digit ones with:
IF(LEN(A3)=3,A3, ...) - this part works just fine.
Next I have a series of Nested if statements to test for each condition using Right(A3,1)=1 (or 2,3,9) as my logical test. Since it is an equals sign that should work & return a true/false answer but it doesn't appear to be working. The answer for a true result should be Left(A3,3) but that isn't working. The answer for a false should be just A3. Full formula below.
=IF(LEN(A3)=3,A3,IF(RIGHT(A3,1)=1,LEFT(A3,3),IF(RIGHT(A3,1)=3,LEFT(A3,3),IF(RIGHT(A3,1)=2,LEFT(A3,3),IF(RIGHT(A3,1)=9,LEFT(A3,3),A3)))))
My goal is to filter through some three/four digit IDs. Any three digit ones need to be ignored. Any that end with a 1,2,3, or 9 need special attention. Those numbers need to drop the last digit.
Sample: 2309 needs to become 230
I have a nested IF statement that isn't working. Normally I don't have issues with the logic in them but I can't see why this wouldn't work.
First I test for the 3 digit ones with:
IF(LEN(A3)=3,A3, ...) - this part works just fine.
Next I have a series of Nested if statements to test for each condition using Right(A3,1)=1 (or 2,3,9) as my logical test. Since it is an equals sign that should work & return a true/false answer but it doesn't appear to be working. The answer for a true result should be Left(A3,3) but that isn't working. The answer for a false should be just A3. Full formula below.
=IF(LEN(A3)=3,A3,IF(RIGHT(A3,1)=1,LEFT(A3,3),IF(RIGHT(A3,1)=3,LEFT(A3,3),IF(RIGHT(A3,1)=2,LEFT(A3,3),IF(RIGHT(A3,1)=9,LEFT(A3,3),A3)))))