PC Review


Reply
Thread Tools Rate Thread

How do I exclude text???

 
 
lsf
Guest
Posts: n/a
 
      1st Mar 2011
Can't find an answer anywhere, thanks in advance. I have a column of
cells containing text and numbers within the same cell, i.e.,
"1@132525" (only the data contained within the the quotation marks).
I would like to perform operations on only the six digits to the right
of the "@"--would appreciate any help! Thanks!
 
Reply With Quote
 
 
 
 
joeu2004
Guest
Posts: n/a
 
      1st Mar 2011
On Feb 28, 5:24*pm, lsf <longshortorf...@gmail.com> wrote:
> I have a column of
> cells containing text and numbers within the same cell,
> i.e., "1@132525" (only the data contained within the the
> quotation marks). I would like to perform operations on
> only the six digits to the right of the "@"


If there are always 6 digits, then use RIGHT(A1,6).

If the number of digits is variable but always after the first 2
characters, then use MID(A1,3,99). The "99" is arbitrary.

If the number of digits and the length of the prefix is variable, but
the digits always follow "@", then use MID(A1,FIND("@",A1)+1,99).

In some contexts, you might need to convert the extract numerical text
to a number explicitly, e.g. --RIGHT(A1,6).

That should be needed only with RIGHT() or MID() is not used in an
arithmetic expression, e.g. IF(--RIGHT(A1,6) > 100000,...).

 
Reply With Quote
 
Rob Golden
Guest
Posts: n/a
 
      1st Mar 2011
There are a couple of functions that could help you in situations like this, most of which involve the finding and replacing of values stored in cells. For your specific question the simplest thing would be to use a combination of =VALUE and =REPLACE. Example:

If cell A1 contains the "text string":
example@25
And cell A2 contains the "text string":
example@15
Then in cell B1 and B2 you could use:
=REPLACE(A1, 1, 8, "") in B1 and
=REPLACE(B2, 1, 8, "") in B2
What this does is takes the cell in the first argument (A1 or A2, respectively), starts at Character 1, goes 8 characters in, and replaces those 8 characters with "" which is nothing.
=REPLACE(Cell to look at, character to start at, number of characters to replace, what to replace it with).
This will, however, return the "text version" of the numbers, 25 and 15, and you will not be able to add them. SO, use the =VALUE function which returns the number value of a text string that is actually a number. You can use them together like this:
=VALUE(REPLACE(A1, 1, 8, ""))

This will return the number value of the text that the replace function returns, which will be a number. You will have to play with the number of characters in the REPLACE function to work with whatever your cells contain.

If that doesnt work for you post an example of what the cells look like?

Good luck,
Rob

Submitted via EggHeadCafe
Win a 2 Year Personal Class Hosting Account From Arvixe.com
http://www.eggheadcafe.com/tutorials...arvixecom.aspx
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exclude certain text from =COUNTA Alice M. Microsoft Excel Worksheet Functions 2 4th Aug 2009 01:46 AM
Exclude records with no Text =?Utf-8?B?S2FybA==?= Microsoft Access Queries 6 10th Aug 2007 05:14 PM
Exclude text from sums =?Utf-8?B?QmUxOA==?= Microsoft Excel Misc 13 27th Feb 2007 10:12 AM
Re: Exclude all but last text to the right Gord Dibben Microsoft Excel Worksheet Functions 0 15th Dec 2006 06:18 PM
Re: Exclude all but last text to the right Roger Govier Microsoft Excel Worksheet Functions 1 15th Dec 2006 05:02 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:00 AM.