Using formula or VBA , i want to populate a range with some specific data xtimes coming from another range of cells.
my excel sheet is show below. Now i want to
thanks in advance
[TABLE="class: grid, width: 100, align: left"]
<tbody>[TR]
[TD][/TD]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[TD]E
[/TD]
[TD]F
[/TD]
[TD]G
[/TD]
[TD]H
[/TD]
[TD]I
[/TD]
[TD]J
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]SUBJECTS[/TD]
[TD]OCCURRENCE[/TD]
[TD][/TD]
[TD][/TD]
[TD]MONDAY[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]MATH[/TD]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD]TUESDAY[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]SCIENCE[/TD]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD]WEDNESDAY[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]SPORT[/TD]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD]THURSDAY[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]ENGLISH[/TD]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD]FRIDAY[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6
[/TD]
[TD]CRAFT[/TD]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7
[/TD]
[TD]MUSIC[/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
my excel sheet is show below. Now i want to
- randomly fill range F1:J5 with the subjects found in A2:A5
- the number of occurrence should match the value in B2:B5
- No subject should Repeat itself in a day (row)
thanks in advance
[TABLE="class: grid, width: 100, align: left"]
<tbody>[TR]
[TD][/TD]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[TD]E
[/TD]
[TD]F
[/TD]
[TD]G
[/TD]
[TD]H
[/TD]
[TD]I
[/TD]
[TD]J
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]SUBJECTS[/TD]
[TD]OCCURRENCE[/TD]
[TD][/TD]
[TD][/TD]
[TD]MONDAY[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]MATH[/TD]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD]TUESDAY[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]SCIENCE[/TD]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD]WEDNESDAY[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]SPORT[/TD]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD]THURSDAY[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]ENGLISH[/TD]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD]FRIDAY[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6
[/TD]
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