withdraw value from text?

K

Kieran1028

Hello,

I have several workbooks with several worksheets, each of which has
cell which contains the following text:

Duration=1000ms

The value '1000' varies, from 500 to 4000, depending on the worksheet.
I need to write a macro that uses that value. Is there a way that I ca
extract that numerical value from the cell, to use in a formul
elsewhere? This occurs on 24 sheets in 10 workbooks, so I'd rather no
have to type the number into a cell 240 times.

Thanks!
-Kiera
 
F

Frank Kabel

Hi
if these values are always followed by "ms" and preceded by '=' try:
=--MID(A1,FIND("=",A1)+1,FIND("ms",A1)-FIND("=",A1)-1)
 
Top