Total Strength to Concentration

  • Thread starter Thread starter jakeo
  • Start date Start date
J

jakeo

I have a sheet with data as follows: either "500mg" or "500mg/50mL". I
want to have a second column and - if the there is no slash in the
data - just pull the data intact - if there is a slash in the data -
then I want to do the math and divide the mg by the ml so it would
look like "10mg/mL".
I already have a column with the 50mL in it.
Tia,
JO
 
try:

=IF(ISERROR(FIND("/",A1,1)),A1,LEFT(A1,FIND("mg",A1,1)-1)/
MID(A1,FIND("/",A1,1)+1,FIND("mL",A1,1)-FIND("/",A1,1)-1)&"mg/mL")

HIH

pls click YESW if it helped
 
I have a sheet with data as follows: either "500mg" or "500mg/50mL". I
want to have a second column and - if the there is no slash in the
data - just pull the data intact - if there is a slash in the data -
then I want to do the math and divide the mg by the ml so it would
look like "10mg/mL".
I already have a column with the 50mL in it.
Tia,
JO



Assume that your data is in A1 cell.

A1 cell
500mg/50ml

Try the below formula in B1 cell
=IF(ISNUMBER(FIND("/",A1)),LEFT(TRIM(A1),SEARCH("MG",TRIM(A1))-1)/
MID(TRIM(A1),FIND("/",TRIM(A1))+1,SEARCH("ML",TRIM(A1))-
(FIND("/",TRIM(A1))+1))&"mg/ml",LOWER(A1))
 
Back
Top