I'd like to assign a person's name to a number based on a range rather than an explicit number. It's possible to do this using formats, but as I have the names in a dataset I'd prefer to avoid the manual process of writing the `proc format`.

```
data names;                      
   input low high name $;  
   datalines;
1   10  John
11  20  Paul
21  30  George
31  40  Ringo
;

data numbers;
    input number;
    datalines;
33
21
17
5
;

```

The desired output is:

```
data output;
    input number name $;
    datalines;
33  Ringo
21  George
17  Paul
5   John
;

```

Thanks for any help.