-
Sort Arrays ...
Hi All,
I have two sets of arrays with related values and different data types.
NumArr(4) = {22,17,24,16}
StrArr(4) = {"A","D","C","B"}
These values are derived from the spreadsheet, where "A" has a value of 22, "B" has a value of 17 etc.
When I want to plot these values, assigning SeriesValues to NumArr and SeriesLabels to StrArr, I get an uneven column chart. I want to display a smooth ascending column chart by sorting NumArr. But by so doing, I should ensure that the order of the string values in the StrArr is also changed accordingly, so that the original relationship holds.
This means that NumArr(1) corresponds to StrArr(1) always and so on for other indexes.
I thought of using a 2-dimensional array, but the data types of the two variables are different.
Is there anyway I can do it by VBA?
Any suggestion will be appreciated.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules