From: Geoff Date: 2007-04-26T05:45:06+09:00 Subject: csv next and previous help Hey there, I'm trying to figure out how to work with the sample data below such that I can take each time there is a C in the third column and update the previous D to a P. An ideas? IM,0000001,D,0,@FRIEDEXT01;IMAGES\00\00;0000001.TIF;2 IM,0000002, ,0,@FRIEDEXT01;IMAGES\00\00;0000002.TIF;2 IM,0000003,D,0,@FRIEDEXT01;IMAGES\00\00;0000003.TIF;2 IM,0000004, ,0,@FRIEDEXT01;IMAGES\00\00;0000004.TIF;2 IM,0000005,C,0,@FRIEDEXT01;IMAGES\00\00;0000005.TIF;2 IM,0000006,D,0,@FRIEDEXT01;IMAGES\00\00;0000006.TIF;2 This should end up like this: IM,0000001,D,0,@FRIEDEXT01;IMAGES\00\00;0000001.TIF;2 IM,0000002, ,0,@FRIEDEXT01;IMAGES\00\00;0000002.TIF;2 IM,0000003,P,0,@FRIEDEXT01;IMAGES\00\00;0000003.TIF;2 IM,0000004, ,0,@FRIEDEXT01;IMAGES\00\00;0000004.TIF;2 IM,0000005,C,0,@FRIEDEXT01;IMAGES\00\00;0000005.TIF;2 IM,0000006,D,0,@FRIEDEXT01;IMAGES\00\00;0000006.TIF;2 Thank you, Geoff