View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Krista Krista is offline
external usenet poster
 
Posts: 31
Default Substitute Function Question #2

Thank you soooo much. That makes perfect sense. Thanks for explaining it!

"Elkar" wrote:

The Substitute functions are evaluated from the inside out. Therefore, when
you get the the part of replacing the 2nd occurance of .0 with R, there is no
2nd occurance, since the first has already been replace. It also won't be
found since you've already removed all the zeros.

Try writting the formula like this:

=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(F2,". 0","T",1),".0","
R",1),"0",""),".21","")

HTH,
Elkar


"Krista" wrote:

Help! I'm soooo close.

My cell looks like this - .0470N.0180E.21

I want my cell to look like this - T47N R18E

It currently looks like this - T47N.18E

Here is my subsitute function:
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE
(F2,".0","T",1),"0",""),".0","R",2),".21","")

I just need the second .0 to be replaced by a <space "R"