val a string

D

David

Hi,

z3 = (Mid(z, (InStr(1, z, "(") + 1), Len(z) - (InStr(1, z, "(") + 1)))
creates a string, which is 1.96%

I want to value it so I changed the formula to

z3 = val((Mid(z, (InStr(1, z, "(") + 1), Len(z) - (InStr(1, z, "(") + 1))))
but it does not work

Any ideas?

Thanks,
David
 
S

Skiffle

David,

For the benefit of others, it would be a nice gesture to post your solution
as opposed to posting "Got it."
 
D

David

Hi,

The formula I endeup with is:
z3 = Val((Mid(z, (InStr(1, z, "(") + 1), Len(z) - (InStr(1, z, "(") + 2))))
/ 100

I could not get Excel to recognize the string a anything other than text
with the % sign it it, so I shortened the Mid to extract one less character.
Then it recognized the number, but not as a %, so it is divided as by 100 to
yield somthing like .07, which was then simply formated correctly.

Thanks,
David
 

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