Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
If And Formula
Hi, Hope you can help me, I am half way to a formula but can't quite get the
last stage. I have a sequence, example BHX-CDG/TLS-CDG/BHX I am using the following formula ==IF(AND(LEFT(H53076,3)=RIGHT(H53076,3),LEN(H53076 )=19),"YES","NO") But I need to take it a stage further to also say if the CDG and CDG = the same, so if position 5-7 matches positions 13- 15 as an additional condition, so in the example above if CDG and CDG were the same that would be the extra condition, but I can't work out how to get there. Any ideas? Many thanks Paula |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
If And Formula
If positions are fixed then you can do something like;
=IF((LEFT(A1,3)&MID(A1,5,3))=(RIGHT(A1,3)&MID(A1,1 3,3)),"YES","NO") This does not check for lenght... You can add it to AND codition where one of the test will be the one above... Let me know how it goes. "Paula" wrote: Hi, Hope you can help me, I am half way to a formula but can't quite get the last stage. I have a sequence, example BHX-CDG/TLS-CDG/BHX I am using the following formula ==IF(AND(LEFT(H53076,3)=RIGHT(H53076,3),LEN(H53076 )=19),"YES","NO") But I need to take it a stage further to also say if the CDG and CDG = the same, so if position 5-7 matches positions 13- 15 as an additional condition, so in the example above if CDG and CDG were the same that would be the extra condition, but I can't work out how to get there. Any ideas? Many thanks Paula |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
If And Formula
Hi, that worked!! Thanks for the formula, made my life a lot easier
tonight... Cheers Paula "Sheeloo" wrote: If positions are fixed then you can do something like; =IF((LEFT(A1,3)&MID(A1,5,3))=(RIGHT(A1,3)&MID(A1,1 3,3)),"YES","NO") This does not check for lenght... You can add it to AND codition where one of the test will be the one above... Let me know how it goes. "Paula" wrote: Hi, Hope you can help me, I am half way to a formula but can't quite get the last stage. I have a sequence, example BHX-CDG/TLS-CDG/BHX I am using the following formula ==IF(AND(LEFT(H53076,3)=RIGHT(H53076,3),LEN(H53076 )=19),"YES","NO") But I need to take it a stage further to also say if the CDG and CDG = the same, so if position 5-7 matches positions 13- 15 as an additional condition, so in the example above if CDG and CDG were the same that would be the extra condition, but I can't work out how to get there. Any ideas? Many thanks Paula |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|