Two Plus Two Newer Archives  

Go Back   Two Plus Two Newer Archives > Other Topics > Computer Technical Help
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-13-2007, 10:38 AM
nimajneb nimajneb is offline
Senior Member
 
Join Date: Mar 2005
Location: T.O.
Posts: 125
Default Excel Help: Making text C&P usable

I'm pasting some text (runlines) in from the web and I'd like to be able to manipulate the numbers. Most are fine but some come in the form of " +1.5 -153" and I can't figure out a way (macro?) to easily convert it to a usable format. All I'm interested in is the last figure, "-153" in the example.

If anyone could be of help it'd be appreciated.
Reply With Quote
  #2  
Old 07-13-2007, 11:43 AM
kerowo kerowo is offline
Senior Member
 
Join Date: Nov 2005
Posts: 6,880
Default Re: Excel Help: Making text C&P usable

If there is always a space between the last number you are interseted in and the rest of it you can play around with the text functions. For instance, if F15 is the cell you have put "+1.5 -153" you can get -153 using this:

=RIGHT(F15,SEARCH(" ",F15,1))

If there are leading spaces you can increase the last "1" in the search function to start looking later in the string.
Reply With Quote
  #3  
Old 07-13-2007, 12:35 PM
nimajneb nimajneb is offline
Senior Member
 
Join Date: Mar 2005
Location: T.O.
Posts: 125
Default Re: Excel Help: Making text C&P usable

Thanks for the help Kerowo, it's working like a charm.
Reply With Quote
  #4  
Old 07-13-2007, 12:48 PM
Shoe Lace Shoe Lace is offline
Senior Member
 
Join Date: Sep 2004
Posts: 585
Default Re: Excel Help: Making text C&P usable

Probably wouldn't hurt to do a TRIM on F15 before you parse it. C/Ping from a browser can be pretty inconsistent. Sometimes you might get a space, sometimes you might get 2, or even none.
Reply With Quote
  #5  
Old 07-13-2007, 01:02 PM
nuclear500 nuclear500 is offline
Senior Member
 
Join Date: Aug 2004
Location: Madison, WI
Posts: 1,065
Default Re: Excel Help: Making text C&P usable

If all you care about are numbers or text that are in a cell based format on the web site, copy the text then paste it into notepad, then copy THAT text and paste it into Excel. It will properly delinate the text then instead of smashing things into one cell that don't belong together in one cell.

All depends on the quality of the source though...for me its worked like a champ.
Reply With Quote
  #6  
Old 07-13-2007, 02:30 PM
BeaucoupFish BeaucoupFish is offline
Senior Member
 
Join Date: Jun 2005
Location: San Francisco
Posts: 723
Default Re: Excel Help: Making text C&P usable

[ QUOTE ]
...copy the text then paste it into notepad, then copy THAT text and paste it into Excel...

[/ QUOTE ]

Or you can try Edit | Paste Special | Values (or right-click).
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:14 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.