Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
()
 
Posts: n/a
Default Cannot format data after using mid() function

Have a strange problem after doing the following with Excel 2000 on a
PC:
1. split up cell using text-to-column on: "(391.281, 15.220)"
2. Use MID(), e.g. "=MID(A11,2,8)" to strip off the parenthesis on
"(391.281"
I use Num_chars=8 because that is the maximum string length I
encounter

After that the cells containing those values cannot be reformatted to a
number by any menu or toolbar actions, and there is no warning that it
does not succeed.

Only thing that works is to apply "=VALUE()" to the result.

Is this expected behavior?
Thanks

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre
 
Posts: n/a
Default Cannot format data after using mid() function

Yes....The MID function converts its first argument to text and returns a
value AS text. To have a number returned, you need to either use the MID
fundtion result in a numeric function OR....the generally accepted method is
to use a double-negative operator:

=--MID(A11,2,8)

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"()" wrote:

Have a strange problem after doing the following with Excel 2000 on a
PC:
1. split up cell using text-to-column on: "(391.281, 15.220)"
2. Use MID(), e.g. "=MID(A11,2,8)" to strip off the parenthesis on
"(391.281"
I use Num_chars=8 because that is the maximum string length I
encounter

After that the cells containing those values cannot be reformatted to a
number by any menu or toolbar actions, and there is no warning that it
does not succeed.

Only thing that works is to apply "=VALUE()" to the result.

Is this expected behavior?
Thanks


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
MH
 
Posts: n/a
Default Cannot format data after using mid() function

Yep, MID() returns a string, not a number. Use the function
=Value(Mid(A11,2,8))

You had already solved your own problem!


"()" wrote in message
ups.com...
Have a strange problem after doing the following with Excel 2000 on a
PC:
1. split up cell using text-to-column on: "(391.281, 15.220)"
2. Use MID(), e.g. "=MID(A11,2,8)" to strip off the parenthesis on
"(391.281"
I use Num_chars=8 because that is the maximum string length I
encounter

After that the cells containing those values cannot be reformatted to a
number by any menu or toolbar actions, and there is no warning that it
does not succeed.

Only thing that works is to apply "=VALUE()" to the result.

Is this expected behavior?
Thanks



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Duke Carey
 
Posts: n/a
Default Cannot format data after using mid() function

In addition to Ron's & MH's answers, you could do a search & replace BEFORE
the Text-to-Columns, ridding the data of the open & close parens. Then the
text-to-columns would likely give you #s instead of text


"()" wrote:

Have a strange problem after doing the following with Excel 2000 on a
PC:
1. split up cell using text-to-column on: "(391.281, 15.220)"
2. Use MID(), e.g. "=MID(A11,2,8)" to strip off the parenthesis on
"(391.281"
I use Num_chars=8 because that is the maximum string length I
encounter

After that the cells containing those values cannot be reformatted to a
number by any menu or toolbar actions, and there is no warning that it
does not succeed.

Only thing that works is to apply "=VALUE()" to the result.

Is this expected behavior?
Thanks


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
Can you use the validate function in a data form in Excel? Jolly Excel Worksheet Functions 0 December 12th 05 11:00 PM
Web Services function call and data refreshing Jonathan Stone Excel Worksheet Functions 0 June 1st 05 02:43 AM
Using INDIRECT function to specify source data donesquire Charts and Charting in Excel 2 May 27th 05 03:53 AM
Sort pages? David Excel Discussion (Misc queries) 15 May 13th 05 11:33 PM
excel data label format special number characters (part 2) todd Excel Discussion (Misc queries) 1 May 4th 05 04:08 PM


All times are GMT +1. The time now is 03:06 AM.

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

About Us

"It's about Microsoft Excel"