View Single Post
  #2   Report Post  
AdamD
 
Posts: n/a
Default


Your problem is in the formula in cell A45. You are capturing the space
" " after the town name and before the "(g7)". The easy fix is to
change the formula in A45 to remove the last 5 characters instead of
four =LEFT(DU!D26,LEN(DU!D26)-RIGHT(*5*)).

The issue you will then face is if the coordinate or whatever the
"(g7)" represents ever changes in length. If it is possible that you
could have a (g12) or an (AA5) then you will again be faced with having
the space as part of the town name. A way to avoid this is to find the
space in the text string and only take the town name before the space.
=LEFT(DU!D26,LEN(DU!D26)-(LEN(DU!D26)-(FIND(" ",DU!D26,1)-1)))

Then your problem will be if you have a town name with a space as part
of the town name such as New York. Your safest bet is to locate the
open parenthesis "(" and to remove text that is to the the right of one
position left of the open parenthesis
=LEFT(DU!D26,LEN(DU!D26)-(LEN(DU!D26)-(FIND("(",DU!D26,1)-2)))


Hope this helps,
Adam


--
AdamD
------------------------------------------------------------------------
AdamD's Profile: http://www.excelforum.com/member.php...o&userid=24530
View this thread: http://www.excelforum.com/showthread...hreadid=381229