I have a dataset containing the age (a) and the number (#) of people with that age in one column each. The set looks like this:
a | #
1 | 2
2 | 3
3 | 0
4 | 1
Now, there are all sorts of inelegant ways to transform the above table into a list where the respective age appears #-times, like so:
1 (=A1)
1
2
2
2
4 (=A6)
I don't have space for such a solution. Instead, I'm looking for a function, which directly applies to the two-column-table above, and which gives me a value that is equivalent to the range A1:A6 from the list. Such a function would make my life much easier, not least of all because I'd finally be able to avoid this stupid SUMPRODUCT function to calculate the average ages.
Bookmarks