I have simple list:
A B
item1 3
item2 2
item3 4
item4 1
Need to output:
A
item1
item1
item1
item2
item2
item3
item3
item3
item3
item4
I have simple list:
A B
item1 3
item2 2
item3 4
item4 1
Need to output:
A
item1
item1
item1
item2
item2
item3
item3
item3
item3
item4
Here is one way of doing it without VBA:
1
in A1=A1+C1
in A2 and copy down to A5'
) in the cell1
in E1, a2
in E2, and copy down as to get 1, 2, ..., 10=VLOOKUP(E1,$A$1:$B$5,2)
in F1 and copy down.It should look like this:
Here's the VBA solution. I don't quite understand the comment that VBA won't be dynamic. It's as dynamic as you make it, just like a formula. Note that this macro will erase all data on Sheet1 and replace it with the new output. If you want the desired output on a different sheet, then change the reference to
Sheet2
or what have you.