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

  • Thread starter Thread starter Craig
  • Start date Start date
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
 
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
 
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.
 
Sorry didn't see the "with".

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

HTH.
 
Back
Top