Excel n number of values from one colums to another

Closed
excel-al - Updated by excel-al on 16/03/17 at 09:18 AM
Hello,

I am really new with programming and with excel so I really appreciate your help in advance.

I am doing a program that randomizes (balanced every 6 patients) patients in treatment A or B in a multicentric trial. I did program the randomisation and balanced it every 6 patients in treatment groups, then I decided to solve the multicentric part of my problem by making two lists (one for the first center, the other for the other one).

So technically I can find all my patients randomized by center. The thing I want to do now, is to ask excel to copy my answers in another cell. I basically want to ba able to say "I want 20 patients in center one and 50 in center 2" and for the program to copy the 20 first lines of my column "center 1" and the 50 first lines of my column "center 2" in another part of the sheet. So ideally I would type my number of patients (in center one or two) in a cell and it would copy my list of treatments in the cells under it.

I have absolutely no clue what so ever how to do that :) . I will be so very grateful for any help you can provide.

I hope the question is relatively clear.

Thank you!