Q:

Creating random numbers that their average be equal to M

I have N numbers in M columns that were created from 1 to 100 randomly.  randbetween (1;100). 
I got their mean.  Now having the mean of N numbers I want create from 1 to 100 randomly that their averags be equal to Mean (inversely)
[Attached file]

A:

Create N random numbers.   
Calculate the average => A.  
Add M-A to the random numbers you've generated.