I am fairly new to Excel VBA and need some help. I have an excel form that inlcudes a multicolumn listbox that displays item number, item description, and price. It is populated from a master spreadsheet which includes an amount field. The amount field in the spreadsheet is (apparently) is a float as there are values such as 1924.3439. The cells are formatted as currency, so the example shows up as $1,924.34. The master sheet also needs to be filtered based on other selections in the form.
If I use rowsource to populate the listbox, it picks up the currency formatting, but it displays all rows regardless of any data filtering.
If I copy the range to an array and then copy the array to the listbox, I get only the filtered rows, but I get unformatted numbers (floats) insead of formatted as currency.
How can I populate a multicolumn listbox with formatted values? Is there a way to have rowsource only pick up visible cells?
Or, is there a simple way to format the data in the array? I tried using value2, but that didn't pick up the currency format.
Your help will be greatly appreciated!
0 · ·