Hi All, I want to copy the variable name from the last group to all the other observations in the same group. For example, copying the last variable name (Country) in Category to all the blank space in the category. I have a dataset: Category Country Group US 1 Israel 1 Canada 1 Country Australia 1 US 2 Israel 2 Canada 2 Country Australia 2 I want: Category Country Group Country US 1 Country Israel 1 Country Canada 1 Country Australia 1 Country US 2 Country Israel 2 Country Canada 2 Country Australia 2 The code for the dataset I have: data have; infile datalines delimiter=','; input Category $ Country $ group$; datalines; ,USA , 1 ,ISRAEL ,1 ,CANADA, 1 Country, AUSTRALIA ,1 ,USA, 2 ,ISRAEL ,2 ,CANADA, 2 Country, AUSTRALIA ,2 ; run; Thanks. Best, Sandyzman1
... View more