View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Arvi Laanemets Arvi Laanemets is offline
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