Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Convert a string value to numeric and sort


With a specific function I created a list as following

15
16
15,5
15,5

What I want is to put those numbers in order of sequence.

First I noticed that my 15,5 values are not integers but strings. So
need to make integers of those. If I combine my formula with the VA
function I come to the following:

Cells(y, 10) = VAL(VLOOKUPNTH(Cells(1, 8), Range("b2:e10"), 2, y))

It looks like if my formula is correct but the result is not correc
and as following:

15
15
15
16

The Val function stops as soon as it recognizes a non-numeric value
How I can I correct this????

Please help me out here

--
marioma
-----------------------------------------------------------------------
mariomaf's Profile: http://www.excelforum.com/member.php...fo&userid=3009
View this thread: http://www.excelforum.com/showthread.php?threadid=49820

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 510
Default Convert a string value to numeric and sort

Hi

When there are formulas returning numbers as string values, then modify them
like
=YourFormula*1
or
=--(YourFormula)

When you have converted formulas to values, then
-format the range with string numbers as General
-enter a number 1 into any free cell, and copy it;
-select the range with your numbers, and then PasteSpecialMultiply. OK;
-delete previously entered number 1.


--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )



"mariomaf" wrote in
message ...

With a specific function I created a list as following

15
16
15,5
15,5

What I want is to put those numbers in order of sequence.

First I noticed that my 15,5 values are not integers but strings. So I
need to make integers of those. If I combine my formula with the VAL
function I come to the following:

Cells(y, 10) = VAL(VLOOKUPNTH(Cells(1, 8), Range("b2:e10"), 2, y))

It looks like if my formula is correct but the result is not correct
and as following:

15
15
15
16

The Val function stops as soon as it recognizes a non-numeric value.
How I can I correct this????

Please help me out here.


--
mariomaf
------------------------------------------------------------------------
mariomaf's Profile:
http://www.excelforum.com/member.php...o&userid=30098
View this thread: http://www.excelforum.com/showthread...hreadid=498201



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Convert a string value to numeric and sort


Amazing!!! Life's easy when you've made it :-)

Thanks


--
mariomaf
------------------------------------------------------------------------
mariomaf's Profile: http://www.excelforum.com/member.php...o&userid=30098
View this thread: http://www.excelforum.com/showthread...hreadid=498201

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
Updating workbook with an alpha sort sheet and a numeric sort shee cjlatta Excel Discussion (Misc queries) 2 January 28th 09 12:00 AM
How can I convert a character string that contains letters & numbers "£2,456.99 (including flights)" into a numeric? ship Excel Worksheet Functions 4 April 3rd 07 02:35 PM
How do I replace last numeric string from a alphanumeric string? Christy Excel Discussion (Misc queries) 3 August 11th 06 12:17 AM
How do I convert numeric data to string format (without VBA)? LissaC Excel Worksheet Functions 1 March 20th 06 07:44 PM
Numeric in Text to convert back to the form of Numeric for VLookup Purposes achilles Excel Discussion (Misc queries) 4 February 6th 06 07:05 AM


All times are GMT +1. The time now is 03:03 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"