Apologies, ballardw. You are correct in that I incorrectly wrote down this problem. The problem should have been: for each date-time in file2, find the LAST date-time and weight that precedes it. Saying "find the first that precedes it" is a bit ambiguous. I also did have the date-time variable formatted as Tom states below (not as a character variable as I originally posted). Also, thank you for correcting the semicolon on datalines. How would you tackle this problem? I would be very grateful for your input! Kind regards, linlin87
... View more