In A1 in your new sheet ('Data in Categories') try to use this formula
=OFFSET(Categories!$C$1, SUMPRODUCT(--(Categories!$A$2:$A$4<=Data!A1)*(Categories!$B$2:$B$4>=Data!A1),ROW(Categories!$C$2:$C$4))-1, 0)
and copy it down
Result
-------- | A1 | -------- | 1 | | 1 | | 2 | | 2 |
Source of the base idea of using SUMPRODUCT
and detailed explanation is Range Lookup in Excel