text to operator


Have fields that look, for example, like "2A5".

I know I can use the REPLACE function to get to "2*5" by replacing the 
letter with the asterisk.


At this point the 2*5 is a text string.

Is there a way to get it to be 2 times 5 so that it gives a result of 10?


Thanx in advance!
0
10/7/2008 6:13:28 PM
excel 39880 articles. 0 followers. Follow

6 Replies
53 Views

Similar Articles

[PageSpeed] 1

You can try:

=PRODUCT(LEFT(A1),RIGHT(A1))

-- 
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------


"Larry Geyer" <larrygeyer@comcast.net> wrote in message 
news:larrygeyer-60EBEE.14132807102008@news.comcast.giganews.com...
>
>
> Have fields that look, for example, like "2A5".
>
> I know I can use the REPLACE function to get to "2*5" by replacing the
> letter with the asterisk.
>
>
> At this point the 2*5 is a text string.
>
> Is there a way to get it to be 2 times 5 so that it gives a result of 10?
>
>
> Thanx in advance! 


0
ragdyer1 (4060)
10/7/2008 7:45:33 PM
Hmmmm, that gets me closer, but unfortunately the number of digits is 
not always a constant (though the text I'm replacing is). 

....and I need to do this without macros.

Any other ideas?





In article <eDie9VLKJHA.3644@TK2MSFTNGP05.phx.gbl>,
 "RagDyer" <ragdyer@cutoutmsn.com> wrote:

> You can try:
> 
> =PRODUCT(LEFT(A1),RIGHT(A1))
> 
> -- 
> HTH,
> 
> RD
> 
> ---------------------------------------------------------------------------
> Please keep all correspondence within the NewsGroup, so all may benefit !
> ---------------------------------------------------------------------------
> 
> 
> "Larry Geyer" <larrygeyer@comcast.net> wrote in message 
> news:larrygeyer-60EBEE.14132807102008@news.comcast.giganews.com...
> >
> >
> > Have fields that look, for example, like "2A5".
> >
> > I know I can use the REPLACE function to get to "2*5" by replacing the
> > letter with the asterisk.
> >
> >
> > At this point the 2*5 is a text string.
> >
> > Is there a way to get it to be 2 times 5 so that it gives a result of 10?
> >
> >
> > Thanx in advance!
0
10/7/2008 8:14:29 PM
Say your datalist was in Column A.
In B1, enter this formula:

=MIN(SEARCH({"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"},A1&"abcdefghijklmnopqrstuvwxyz"))

And in C1, enter this formula:

=--LEFT(A1,B1-1)*--RIGHT(A1,LEN(A1)-B1)

Select *both* B1 and C1, and copy down as needed.

-- 
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Larry Geyer" <larrygeyer@comcast.net> wrote in message 
news:larrygeyer-23C782.16142907102008@news.comcast.giganews.com...
>
> Hmmmm, that gets me closer, but unfortunately the number of digits is
> not always a constant (though the text I'm replacing is).
>
> ...and I need to do this without macros.
>
> Any other ideas?
>
>
>
>
>
> In article <eDie9VLKJHA.3644@TK2MSFTNGP05.phx.gbl>,
> "RagDyer" <ragdyer@cutoutmsn.com> wrote:
>
>> You can try:
>>
>> =PRODUCT(LEFT(A1),RIGHT(A1))
>>
>> -- 
>> HTH,
>>
>> RD
>>
>> ---------------------------------------------------------------------------
>> Please keep all correspondence within the NewsGroup, so all may benefit !
>> ---------------------------------------------------------------------------
>>
>>
>> "Larry Geyer" <larrygeyer@comcast.net> wrote in message
>> news:larrygeyer-60EBEE.14132807102008@news.comcast.giganews.com...
>> >
>> >
>> > Have fields that look, for example, like "2A5".
>> >
>> > I know I can use the REPLACE function to get to "2*5" by replacing the
>> > letter with the asterisk.
>> >
>> >
>> > At this point the 2*5 is a text string.
>> >
>> > Is there a way to get it to be 2 times 5 so that it gives a result of 
>> > 10?
>> >
>> >
>> > Thanx in advance! 


0
ragdyer1 (4060)
10/7/2008 8:23:22 PM
It just occurred to me that maybe you're *only* replacing the "A"!

If so, try:

=LEFT(A1,SEARCH("a",A1)-1)*RIGHT(A1,LEN(A1)-SEARCH("a",A1))

And copy down as needed.

BTW, you *don't* need the unary ( -- ) when using the *.

You can also eliminate it in the *previous post*:

=LEFT(A1,B1-1)*RIGHT(A1,LEN(A1)-B1)


-- 
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

"RagDyer" <ragdyer@cutoutmsn.com> wrote in message 
news:evrgFrLKJHA.3460@TK2MSFTNGP04.phx.gbl...
> Say your datalist was in Column A.
> In B1, enter this formula:
>
> =MIN(SEARCH({"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"},A1&"abcdefghijklmnopqrstuvwxyz"))
>
> And in C1, enter this formula:
>
> =--LEFT(A1,B1-1)*--RIGHT(A1,LEN(A1)-B1)
>
> Select *both* B1 and C1, and copy down as needed.
>
> -- 
> HTH,
>
> RD
>
> ---------------------------------------------------------------------------
> Please keep all correspondence within the NewsGroup, so all may benefit !
> ---------------------------------------------------------------------------
> "Larry Geyer" <larrygeyer@comcast.net> wrote in message 
> news:larrygeyer-23C782.16142907102008@news.comcast.giganews.com...
>>
>> Hmmmm, that gets me closer, but unfortunately the number of digits is
>> not always a constant (though the text I'm replacing is).
>>
>> ...and I need to do this without macros.
>>
>> Any other ideas?
>>
>>
>>
>>
>>
>> In article <eDie9VLKJHA.3644@TK2MSFTNGP05.phx.gbl>,
>> "RagDyer" <ragdyer@cutoutmsn.com> wrote:
>>
>>> You can try:
>>>
>>> =PRODUCT(LEFT(A1),RIGHT(A1))
>>>
>>> -- 
>>> HTH,
>>>
>>> RD
>>>
>>> ---------------------------------------------------------------------------
>>> Please keep all correspondence within the NewsGroup, so all may benefit 
>>> !
>>> ---------------------------------------------------------------------------
>>>
>>>
>>> "Larry Geyer" <larrygeyer@comcast.net> wrote in message
>>> news:larrygeyer-60EBEE.14132807102008@news.comcast.giganews.com...
>>> >
>>> >
>>> > Have fields that look, for example, like "2A5".
>>> >
>>> > I know I can use the REPLACE function to get to "2*5" by replacing the
>>> > letter with the asterisk.
>>> >
>>> >
>>> > At this point the 2*5 is a text string.
>>> >
>>> > Is there a way to get it to be 2 times 5 so that it gives a result of 
>>> > 10?
>>> >
>>> >
>>> > Thanx in advance!
>
> 


0
ragdyer1 (4060)
10/7/2008 8:39:28 PM
By "without macros" do you also mean a user defined function?

If not, this UDF and formula will work.

Function EvalCell(RefCell As String)
    Application.Volatile
    EvalCell = Evaluate(RefCell)
End Function

=evalcell(SUBSTITUTE(A1,"A","*"))

Otherwise, go with RD's second suggestion.


Gord Dibben  MS Excel MVP


On Tue, 07 Oct 2008 16:14:29 -0400, Larry Geyer <larrygeyer@comcast.net>
wrote:

>Hmmmm, that gets me closer, but unfortunately the number of digits is 
>not always a constant (though the text I'm replacing is). 
>
>...and I need to do this without macros.
>
>Any other ideas?

0
Gord
10/7/2008 9:07:57 PM
On Tue, 07 Oct 2008 14:13:28 -0400, Larry Geyer <larrygeyer@comcast.net> wrote:

>
>
>Have fields that look, for example, like "2A5".
>
>I know I can use the REPLACE function to get to "2*5" by replacing the 
>letter with the asterisk.
>
>
>At this point the 2*5 is a text string.
>
>Is there a way to get it to be 2 times 5 so that it gives a result of 10?
>
>
>Thanx in advance!

=PRODUCT(LEFT(A1,SEARCH("A",A1)-1),MID(A1,SEARCH("A",A1)+1,99))
--ron
0
ronrosenfeld (3124)
10/7/2008 11:33:51 PM
Reply:

Similar Artilces:

TEXT = text
I have some data in an Excel table which uses case sensitive codes. Does anyone know of a way to perform case sensitive VLookups. Example. A1 contains "TEXT", A2 contains "One". B1 contains "text", B2 contains "Two" If I enter "text" in cell A4 and the following VLookup in B4: =VLOOKUP(A4;A1:B2;2;FALSE) I get the answer "One", but I would like to see "Two". I have found a work around by converting a number of characters to their ASCII codes, but this is very messy. I know that the FIND function is case sensitive whe...

What is the Limit of Text Boxes & Labels a User Form can have?
What is the Max File Size a User Form can be? I have Windows 7 with Office 2007. Does it have like a 64K limit? The file size as far as kb. My entire Program is 1,203 Kb. When I ran it I got a "compile Error out of memory", so I exported my User Form. Then I looked at the file size of just the User Form in a blank Workbook 34 KB = .frm 219 KB = frx My user Form is a Multi Page with 4 Pages on it. There are alot of text boxes and labels on the 4 sheets. Is there a limit to the number of text boxes & labels you can have in a user Form? I have 12 GB of ...

Selecting text in a document
Hi, I have a macro which finds a certain piece of text in the document and then moves down a line and then selects all the text between that and the end of the document and the selected text is later sent out in an email. This has been working for some time but I have recently had some problems because the text is not being selected as before (extendmode on?) and I am sending out blank emails. The code fragment that I use to select the text is as follows Selection.HomeKey wdStory Selection.Find.Execute "Issued at" Selection.MoveDo...

CScrollView and text height
I call DrawText to draw text on the CScrollView.When text has multi-line,how do I get the screen height to draw them? Thanks. ___________________________________ http://www.msale.net/bbs a Chinese-language message board for developers,including palm,ppc,symbian,and etc. http://www.zirong.net/blog/ Miken's private life If you are trying to calculate the height of a multiline string user DrawText with the DT_CALCRECT flag. It will use the width of the Rect that you pass it, and sets the bottom of the rect to what the bottom would be if you draw it. AliR. "Miken" <mikenwon...

Resizing cells to fit text returned by VLOOKUP
I have some VLOOKUPs which sometimes return 50 or 60 characters (they're in merged cells). I want the text to wrap, and the cell to enlarge to fit the text - Just like it does whan you type it in, but somehow, because it is being returned from a formula it just displays the bottom line of the wrapped text, and doesn't resize the row. Anyone know how I cam make it fit? I'm happy to use a VBA solution if there's no built in way to make it happen automatically. Thanks M Would you mind to limit your request to ONE newsgroup? Joerg "Michelle" <mh_londonNOJUN...

Text Boxes on Charts not showing up
Has anyone experienced this? I've got a chart in a spreadsheet and I add text boxes to the graph section. They appear on the page yet when I click off the page, the text box disappears. If I go to print preview, the text boxes are there so why can't I see them on the screen? I've tried the bring forward command but that didn't work. This is also sporadic as some of my text boxes stay in place why others seem to disappear. Sue - If the chart is selected when you draw the text box, the text box becomes part of the chart. If not, the text box just floats along in the dr...

avoid losing text when text submission timed out?
Often I have to log in to some web site to enter a few paragraphs of text (e.g. web email submission, user forum, product reviews, etc). Sometimes it takes me a while to compose the text, and by the time I click submit, I get a response saying the session has timed out, and the text that took me a long time to compose is gone. Is there a way to retrieve this text? Clicking the back button doesn't work. Perhaps it is in a cache somewhere? The portion of the web page containing your text may or may not be in TIF, but here's what I do: Before I hit the 'Submit'...

Ranking Numbers with Text
I am trying to sort a list of serial numbers containing alpha an numeric text into ascending order so LOOKUP will work. ie: 5KJJAHAS63PL84681 input into col. E 5KJJAHAS43PL84685 5KJJAHASx3PL84683 5KJJAHAS83PL84686 5KJJAHAS63PL84689 5KJJAHAS43PL84684 5KJJAHAS23PL84682 5KJJAHAS03PL84688 5KJJAHASx3PL84610 5KJJAHAS83PL84690 5KJJAHAS83PL84691 Only the ninth and 13 thru 17 digits change. Worksheets are protected except for inputs. I need the sort to use the LOOKUP function. I tried =IF(E3>0,(RIGHT(E3,5)*1),999999) to RANK by the last 5 =RANK(D3,D$3:D$102,1)+COUNTIF(D$3:D3,D3)-1, but then LOOKUP ...

Null in text box
Can anyone see what might be wrong withthis procedure? Private Sub Job_Number_BeforeUpdate(Cancel As Integer) If IsNull(Me.Job_Number) = True Then MsgBox "No Job Number Entered" Cancel = True End If End Sub -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200707/1 "Haggr1 via AccessMonster.com" <u35393@uwe> wrote in news:74fa8171f7137@uwe: > Can anyone see what might be wrong withthis procedure? > > Private Sub Job_Number_BeforeUpdate(Cancel As Integer) > > If IsNull(Me.Job_...

I TYPE IN A TEXT BOX AND IT COPIES THE TEXT TO OTHER TEXT BOXES
Does anyone know how to fix this? Shari wrote: > Does anyone know how to fix this? ================================ Are you editing text on the Master page? -- John Inzer MS Picture It! - Digital Image MVP Digital Image Highlights and FAQs http://support.microsoft.com/ph/695 Notice This is not tech support I am a volunteer Solutions that work for me may not work for you Proceed at your own risk Yes, I thinnk so. :-) I'm not on the background. It's an 8 pg brochure I'm creating and it didn't do it before I added page 8. ...

convert text case in same column or row?
How do I convert text case in the same colum or row. At the moment I use UPPER, but have to create a new column/row. You may find this to be handy Sub ChangeCase() 'Don Guillett Application.ScreenUpdating = False Dim r As Range nCase = UCase(InputBox("Enter U for UPPER" & Chr$(13) & " L for lower" & Chr$(13) & " Or " & Chr$(13) & " P for Proper", "Select Case Desired")) Select Case nCase Case "L" For Each r In Selection.Cells If r.HasFormula Then r.Formula = LCase(r.Formul...

Re: Using Text Styles
Front page will not have a Next Edition. AFAIK it is dead. > Ed Bennett wrote: > > Ron Hagley wrote: > >> I have a document with Headings on one line followed by a linespace > >> then on a new line a subheading followed by (on the same line ) a > >> description > >> > >> I wish to use TEXT STYLES as this pattern repeats many times, I have > >> no problem seting up the styles for the headings, but when I do the > >> same for the SUBHEADINGS the text style is applied to the WHOLE line > >> including the description...

Logical Test: Text Against Number 01-05-10
Can anyone provide insight into how Excel treats this type of test? For example, why does Excel return TRUE when we have ="a">2 but FALSE when ="a"<2 (or any other number for that matter). Thanks. That's the way it is treated. Any kind of text is larger than the largest number. Any worth? hit the YES below -- Max Singapore --- "rslaughter5" wrote: > Can anyone provide insight into how Excel treats this type of test? For > example, why does Excel return TRUE when we have ="a">2 but FALSE when ="a"<2 ...

Text in Cell as Formula #2
Peo + Julie Many thanks for your answer with the last query. I Have a similar question, please advise: This method [INDIRECT()] does work with values form a different spreadsheet. I type the link (as text) from a different spreadsheet in a cell in the current spreadsheet and use this method to call a value in a cell. Would appreciate a detailed answer (if complicated) - I'm a novice user! Many thanks in advance. ...

Plain text warning/ VS2005
Whenever I add a CRecordset derived class, I get an error telling me the password for the DB is sent in "plain text" and is not secure etc. I comment that line out, but how much of a security risk is this? What can I do with my Access database to avoid this? VC 6.0 never gave this error... tia b If you are on any kind of network that anyone can look at, you are wide open for attack. Example, a University network; potentially, ever student can be running a packet sniffer and see your password. Anything that passes acros the Internet outside your local intranet is also vuln...

Rotate text?
Office(publisher) 2K. Is there anyway to rotate a specific word in a sentence? L. Not if it's part of the sentence rather than being a separate text box. -- JoAnn Paules MVP Microsoft [Publisher] "L." <ofallon12320@yahoo1.com> wrote in message news:%23TBzesS9FHA.2616@TK2MSFTNGP15.phx.gbl... > Office(publisher) 2K. > > Is there anyway to rotate a specific word in a sentence? > > L. > > Thanks for the info. L. "JoAnn Paules [MSFT MVP]" <jl_paules@hotmail.com> wrote in message news:U46dnd7PfZ5CTBHenZ2dnUVZ_sidnZ2d@suscom....

shading behind text
I would like to place white text within a box of gray shading. When I use the 'background' function, it shades the entire document. How do I limit the background to a line of text? thanks Ken Depending on your preference I can think of at least 3 ways, but they all may not be available to you... or instructions may vary. It depends on what version of Word you're using & you haven't even indicated whether it's Windows or Mac. Since you posted to the Mac Word group I'll assume you're using a Mac version & further that it is the most current (2008):...

How to get the text of each selection?
Hi, Dear All We can use Ctrl key and mouse to multi-select range in a document, but if somebody could tell me how to get the text of each selection? Cheers! osen Sorry, it is not really possible. See http://support.microsoft.com/?kbid=288424. The closest you can come is to use Selection.Copy, then open a new blank document and paste. The individual pieces will be separated by paragraph marks, but you can't distinguish between those and any paragraph marks that might have been in the middle of some pieces. -- Regards, Jay Freedman Microsoft Word MVP FA...

Performs illegal operation on save
This happens on one sheet only of one document when rows are inserted, data is entered and saved. Can any one help please. EXCEL caused an invalid page fault in module MSO97.DLL at 0167:306c2481. Registers: EAX=00000000 CS=0167 EIP=306c2481 EFLGS=00010246 EBX=00000000 SS=016f ESP=0062c6f4 EBP=00000001 ECX=001e0000 DS=016f ESI=00000000 FS=1abf EDX=00000b02 ES=016f EDI=00000064 GS=0000 Bytes at CS:EIP: 66 8b 73 06 81 fe fe ff 00 00 0f 84 81 00 00 00 Stack dump: 306c2433 008b0030 306c2433 00000000 001e0f18 306c247d 00000000 30192ce1 001e0f18 00000064 00020000 00020000 3009ebdb 008b0030 0000000...

Further Info on changing text in one cell to to criteria of another.
I have a workbook that charts the progress of my clients. One of m cells automatically determines their age, and when they become olde than six, I need another cell's text to automatically change to "AO (standing for "Aged Out" of my program). I cannot us the functio =IF(A1>6,"AO"," ") because I already have the clients status imputed i that cell. I need it to be a type of conditional formatting or VB cod so that it will automatically change once the reach 6. I have attache an example of my workbook. It has a VB code that changes the row colo based on ...

Text Search in for the field of memo does not workd
hello, Here is my VBA, but does not work for text search in my textbox search. Private Sub Txtcari_AfterUpdate() Dim strSQL As String strFilter = "([Nota] LIKE """ & "*" & Me.Txtcari & "*" & """)" Me.Filter = strFilter Me.FilterOn = True CurrentDb.Execute strSQL, dbFailOnError End Sub Thanks in advance for your help. -- H. Frank Situmorang You've declared strSQL, and you attempt to use its content with the Execute method, but you haven't assigned anything to it. -- Doug Steele, Microsoft Access M...

Current Year to display in text
Is there a way to get the current year to display in a title if there is other text with it? For example: I have a sheet with the following text in it: 2011 Benefit Time I'm looking for a way have just the year update itself at the change of the new year so when someone opens a blank form in 2012, it will read 2012 Benefit Time Again, the title is all in once cell with it centered. I would rather not place the date in the cell by itself. Is there a way to insert just a date prior to text inside a cell? Or Is there an insert date option like in MS word? Hi Gadgetman, Am Thu, 23 ...

Cropping text from a number
Hi I am doing a staight comparisions of two numbers in two different cells (a percentage increase) However one of the numbers I am using has an asterisk on the left hand end of the number. Obviously excel cannot calculate the increase given it is not redaing the cell as a number. How can I right a formula so that excell does not read the asterisk rather only the number any help would be appreciated Hi Matt! You could set up an extra column to the right of the offending numbers and use: Data > Text to Columns Or you could set up and extra column and parse the offending numbers ...

How do I wrap text in a text box around another text box
I'm creating a newsletter with columns. I have a horizontal text box with the article title. I want the vertical column at the same height as the top of the horizontal column. Right now the text in the vertical column is going through some of the horizontal box. I want it to wrap. I've tried to selecting "square" for each of the two boxes wrapping style. Nothing changes. How do I get the text to wrap around the horizontal text box? I'm using Publisher 2003 I found a way around this by copying another textbox from the template that was apprently already set ...

Text Box within a Text Box
I am creating a brochure and want to put a testimonial (text box) in within a services text box. I would like the text in the services text box to continue to flow around the testimonial text box. How do I make this work? THANKS, MEG Right-click the services text box, format text box, layout tab, select square or tight. Be certain the testimonial text box is in front. Actually it should flow around automatically. -- Mary Sauer MS MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "MEG" <MEG@discussions.microsoft.com> wrote in messag...