In reply to Blessing Sibanda.

You can use the following 3-step approach to randomly select equal samples for each university. 1) First, you would need to split your single excel sheet into 3 data sets (OXFORD, CAMBRIDGE, PORTSMOUTH). 2) Then determine the sample size as the lowest number (1800) observations, and 3) then call this macro (with random selection) on each of the 3 data sets:

%split(SRC_DATASET=OXFORD, OUT_PREFIX=WORK.OXFORD, SPLIT_NUM=1800, SPLIT_DEF=NOBS);
%split(SRC_DATASET=CAMBRIDGE, OUT_PREFIX=WORK.CAMBRIDGE, SPLIT_NUM=1800, SPLIT_DEF=NOBS);
%split(SRC_DATASET=PORTSMOUTH, OUT_PREFIX=WORK.PORTSMOUTH, SPLIT_NUM=1800, SPLIT_DEF=NOBS);

Your resulting datasets WORK.OXFORD_1, WORK.CAMBRIDGE_1 and WORK.PORTSMOUTH_1 will have each 1800 observations (equal sample size) randomly selected from your original samples. You may disregard WORK.OXFORD_2, WORK.OXFORD_3, WORK.CAMBRIDGE_2 data sets.

Hope this helps.