Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default val a string

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default val a string

Got it.

Thanks

"David" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default val a string

David,

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

"David" wrote in message
...
Got it.

Thanks

"David" wrote:

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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default val a string

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

"Skiffle" wrote:

David,

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

"David" wrote in message
...
Got it.

Thanks

"David" wrote:

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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Grabbing string values from the end of a string of an unknown length Mark Stephens Excel Programming 24 July 8th 08 06:57 AM
Replace Hyperlink Addresses Help 'Dim OldStr As String, NewStr As String Ron[_14_] Excel Programming 6 January 23rd 07 07:38 PM
Importing Long String - String Manipulation (INVRPT) (EDI EANCOM 96a) Brian Excel Programming 3 February 9th 06 03:38 PM
Importing Long String - String Manipulation (EDI EANCOM 96a) Brian Excel Programming 6 February 9th 06 12:27 PM
Create a formula into a String then assign string to a cell Myrna Larson[_2_] Excel Programming 6 August 23rd 03 09:42 PM


All times are GMT +1. The time now is 05:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"