Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Hassan Alameh
 
Posts: n/a
Default substituting two text occurances in same cell.

Hi,

I have a long list of times entered as 8:30am - 9:15pm , where there
is no space between the time and the text am & pm.

Can I use the formula substitute to replace both the "am" and
"pm" with " am" and " pm" respectively,

i.e to insert a space between the time and text in a single formula?



is it possible to use OR to replace BOTH of them?



I would appreciate any help....



Thank you.

  #2   Report Post  
KL
 
Posts: n/a
Default

Hi Hassan ,

Try this

=SUBSTITUTE(SUBSTITUTE(A1,"am"," am"),"pm"," pm")

Regards,
KL


"Hassan Alameh" wrote in message
oups.com...
Hi,

I have a long list of times entered as 8:30am - 9:15pm , where there
is no space between the time and the text am & pm.

Can I use the formula substitute to replace both the "am" and
"pm" with " am" and " pm" respectively,

i.e to insert a space between the time and text in a single formula?



is it possible to use OR to replace BOTH of them?



I would appreciate any help....



Thank you.



  #3   Report Post  
CLR
 
Posts: n/a
Default

You could also do it with Find Replace in two steps on the whole column,
in place, by replacing the "a" with " a" and the "p" with " p" without the
quotes.

Vaya con Dios,
Chuck, CABGx3


"KL" wrote in message
...
Hi Hassan ,

Try this

=SUBSTITUTE(SUBSTITUTE(A1,"am"," am"),"pm"," pm")

Regards,
KL


"Hassan Alameh" wrote in message
oups.com...
Hi,

I have a long list of times entered as 8:30am - 9:15pm , where there
is no space between the time and the text am & pm.

Can I use the formula substitute to replace both the "am" and
"pm" with " am" and " pm" respectively,

i.e to insert a space between the time and text in a single formula?



is it possible to use OR to replace BOTH of them?



I would appreciate any help....



Thank you.





  #4   Report Post  
Hassan Alameh
 
Posts: n/a
Default

:), missed that !!! thank u clr

  #5   Report Post  
Hassan Alameh
 
Posts: n/a
Default

It worked perfectly, Thanks alot dear KL,
i'm so grateful



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help inserting a Cell Value in a Text Cell Dave Excel Worksheet Functions 5 March 5th 05 09:06 PM
Cell set to wrap text and blank line -- fix? Fred Holmes Excel Discussion (Misc queries) 0 January 25th 05 07:10 PM
how to hyperlink text to a cell steve New Users to Excel 1 December 14th 04 08:21 PM
Formatting a cell as "text" in the number catagory. Ed Excel Worksheet Functions 3 December 7th 04 07:12 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 08:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"