View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Robert Lundqvist
 
Posts: n/a
Default Replacing missing values?

I have this fairly large dataset with two kinds of missing values (NA):

1) Holes should be filled with the first before the sequence of
missing values (i e a constant level up to next value)

From: ...30 31 29 NA NA NA 31 32 NA 34
to: ...30 31 29 29 29 29 31 32 32 34

2) Holes shold be filled by a linear interpolation based on the values
between holes.

From: ...30 31 29 NA NA NA 31 32 NA 34
to: ...30 31 29 29.5 30.0 30.5 31 32 33 34

Any chance this could be achieved by macros? Any ideas are most welcome.

Robert
********************
Robert Lundqvist
Dept of mathematics
Lulea University of Technology
Sweden

http://www.ltu.se/web/pub/jsp/polopo...d=4171&a=10697