I like to use PROC EXPAND for problems like this. However, if you do not have an ETS license, you can use PROC SQL and do something like this
data have;
input Company_Name :$50. year sales;
infile datalines dlm=',';
datalines;
20 Microns Ltd.,2005,565.2
20 Microns Ltd.,2006,668.9
20 Microns Ltd.,2007,869.1
20 Microns Ltd.,2008,1067.8
20 Microns Ltd.,2009,1374.9
20 Microns Ltd.,2010,1768.2
3I Infotech Ltd.,2005,2064.7
3I Infotech Ltd.,2006,2755.5
3I Infotech Ltd.,2007,3313.1
3I Infotech Ltd.,2008,4451
3I Infotech Ltd.,2009,5249.6
3I Infotech Ltd.,2010,5195.3
;
proc sql;
create table want as
select *,
(select std(sales) from have
where Company_Name=a.Company_Name
and a.year-5 le year le a.year)
as stddev format=8.2
from have as a;
quit;