PDA

View Full Version : Solved: Listbox - List values with one decimal place



jmaocubo
02-13-2012, 04:01 AM
I have the following code which lists the values ​​in column E. The problem is that this value is the result of a formula whose value may have several decimal places. How do I list the result with only one decimal place?

Private Sub UserForm_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)


Dim Rng As Range

Set Rng = Range(Sheets("Auxiliar").Range("A1"), Sheets("Auxiliar").Range("A" & rows.Count).End(xlUp)).Resize(, 5)



With ListBox1

.ColumnCount = 2

.ColumnWidths = "50,30"

.List = Application.Index(Rng, Evaluate("row(" & Rng.Address & ") "), Array(1, 5))



End With



End Sub


Thanks in advance

Fanny92
02-13-2012, 04:23 AM
Hi there.
I need Excel help too.
I can't do these charts my boss asked for.
How do I make them?

Bob Phillips
02-13-2012, 04:38 AM
Hi there.
I need Excel help too.
I can't do these charts my boss asked for.
How do I make them?

So start your own thread, describe your problem, tell us what you have tried, and you just may get some help.

Bob Phillips
02-13-2012, 04:42 AM
Change the formula to round it to one decimal place.

jmaocubo
02-13-2012, 04:51 AM
Change the formula to round it to one decimal place.

So stupid ....:banghead:

You are absolutely right. :doh:Should have thought a little more before I put the question. Thanks again