How to use a numeric value in text to perform calculations?

C

Craig

Is there a way to have a cell contain text, such as "with
25% discount" and then to use the 25% value in the cell
to calculate the discount off the retail price, or do I
need to put the text in one cell and the value in another?

Thanks,
Craig
 
L

Laura Cook

If the percent will always be 2 digits followed by "%", then the following
should work. With "with 25% discount" in A1 and the retail price in B1:

=((100-RIGHT(LEFT(A1,FIND("%",A1)-1),2))/100)*B1
 
J

jr

Use:
FORMAT | CELLS | NUMBER | CUSTOM
In the "Type:" field enter
"with "##" % discount"

in this cell, enter ONLY the percent discount. The cell
can be manipulated as if it were a number.
 
A

Adrian

Sorry didn't see the "with".

Try this: =MID(A1,FIND(" ",A1)+1,(FIND("%",A1))-FIND(" ",A1)-1)

HTH.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top