Convert a string value to numeric and sort

  • Thread starter Thread starter mariomaf
  • Start date Start date
M

mariomaf

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
 
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 PasteSpecial>Multiply. OK;
-delete previously entered number 1.
 
Back
Top