Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That's excellent!
I was right about it being best to develop your formula! Regards, Peter T "JE McGimpsey" wrote in message One way: =SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBST ITUTE(LEFT(A1,LEN(A1)-( RIGHT(A1,1)=","))," ,",","),",,",","),",,",","),",,",","),",,",",") If this isn't enough to get rid of all the extra commas, just wrap it in another SUBSTITUTE(...,",,",",") In article , David Godinger wrote: "Peter T" <peter_t@discussions wrote: =LEFT(SUBSTITUTE(A1,", , ",""),IF(RIGHT(SUBSTITUTE(A1,", , ",""))=",",LEN(SUBSTITUTE(A1,", , ",""))-1,LEN(SUBSTITUTE(A1,", , ","")))) This does almost everything I want, but I made a mistake in expressing myself. I don't want to be left with nothing. I always want to leave one instance of ", " Whether I'm substituting ", , , , , " or ", , " I always want to be left with ", " Thanks again if you have the time. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Replacing a formula with the actual string or number | Excel Discussion (Misc queries) | |||
Extracting and replacing the first word in a String of text | Excel Worksheet Functions | |||
Replacing numeric X-axis labels with corresponding text string | Excel Discussion (Misc queries) | |||
replacing text within a formula | Excel Worksheet Functions | |||
Replacing a value within a string using a formula | Excel Programming |