Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General PowerPoint Questions / February 2007

Tip: Looking for answers? Try searching our database.

Replacing specific text within a table cell

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Barb Reinhardt - 26 Feb 2007 16:52 GMT
I have identified a specific textrange that I want to replace text in, but am
not sure how to go about doing it.  I want to change "M" to "" and "$" to ""
in that text range.  Can someone assist?

Thanks,
Barb Reinhardt
John Wilson - 26 Feb 2007 17:28 GMT
Hi Barb

Is this "M" and" $" as discreet words or within other words. Surely
replacing all M's with "" would give some unexpected results?
Signature

Amazing PPT Hints, Tips and Tutorials-http://www.PPTAlchemy.co.uk
http://www.technologytrish.co.uk/ppttipshome.html
email john AT technologytrish.co.uk

> I have identified a specific textrange that I want to replace text in, but am
> not sure how to go about doing it.  I want to change "M" to "" and "$" to ""
> in that text range.  Can someone assist?
>
> Thanks,
> Barb Reinhardt
Barb Reinhardt - 26 Feb 2007 17:38 GMT
It's with specifically identified cells and is not a global change.  I've
actually determine how to do this, but the results are now strings and I need
them to be numeric.   How can I resolve this?

Thanks,
Barb Reinhardt

> Hi Barb
>
[quoted text clipped - 7 lines]
> > Thanks,
> > Barb Reinhardt
John Wilson - 26 Feb 2007 19:43 GMT
Use CLng to convert to a long number
not very good example!
strsA ="2"
A =CLng(strsa)
Signature

Amazing PPT Hints, Tips and Tutorials-http://www.PPTAlchemy.co.uk
http://www.technologytrish.co.uk/ppttipshome.html
email john AT technologytrish.co.uk

> It's with specifically identified cells and is not a global change.  I've
> actually determine how to do this, but the results are now strings and I need
[quoted text clipped - 14 lines]
> > > Thanks,
> > > Barb Reinhardt
John Wilson - 26 Feb 2007 19:53 GMT
Maybe I misunderstood? "M" as a number?? Did you mean the character code?
Signature

Amazing PPT Hints, Tips and Tutorials-http://www.PPTAlchemy.co.uk
http://www.technologytrish.co.uk/ppttipshome.html
email john AT technologytrish.co.uk

> Use CLng to convert to a long number
> not very good example!
[quoted text clipped - 19 lines]
> > > > Thanks,
> > > > Barb Reinhardt
Steve Rindsberg - 26 Feb 2007 19:51 GMT
> It's with specifically identified cells and is not a global change.  I've
> actually determine how to do this, but the results are now strings and I need
> them to be numeric.   How can I resolve this?

Textranges contain strings, never numerics.  I'm guessing you need to convert values
like "$500M" to something that you can convert to numerics?

Something like this, assuming you've got the value you want to work with in sTemp, a
string variable:

sTemp = Replace(sTemp,"M","")
sTemp = Replace(sTemp,"$","")
' and depending on whether you plan to use val(sTemp) or cdbl(sTemp) or
' something else to convert to numeric, you may also want to
' eliminate commas
sTemp = Replace(sTemp,",","")

Now Cdbl(sTemp) or Val(sTemp) gives you a numeric

> Thanks,
> Barb Reinhardt
[quoted text clipped - 10 lines]
> > > Thanks,
> > > Barb Reinhardt

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ:  www.pptfaq.com
PPTools:  www.pptools.com
================================================
Barb Reinhardt - 26 Feb 2007 20:40 GMT
That's exactly what I'm doing.  Let me check this out.  

> > It's with specifically identified cells and is not a global change.  I've
> > actually determine how to do this, but the results are now strings and I need
[quoted text clipped - 35 lines]
> PPTools:  www.pptools.com
> ================================================
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.