Laserfiche WebLink
<br />I <br />I <br />I <br />I <br />I <br />I <br />I <br />I <br /> <br />8.0 Appel/dices <br />12.2 Appendix A.Data Analysis <br /> <br />~1icrosoft Visual Basic Macro used to separate the fa\\' GPS data inlo individual cross section <br />files. For this program to work. the description for each point in a cross section must be <br />identical. with each cross section having a unique description. and located in column "E", RO\.... <br />''I'' must also conlam the header information. The program first separates the data into <br />different files. one for each cross-section. and then saves those files as tab delimited text files <br />with the description as the file name. <br /> <br />Sub AutoSeparate() <br /> <br />I <br />I <br />I <br />I <br />I <br />I <br />I <br /> <br />ACllvcCeII.SpeciaICells(xICeIlTypeLastCell).Offset(l. O).FormulaR IC I = "End" <br />headerrow = Rows(" 1: I ").Formula <br />Range( "E2").Activate <br />Description = ActiveCell.FormulaR Ie 1 <br />Do <br />ActiveCell.Offsct( I. O).Activate <br />description2 = ActiveCell.FonnulaR IC I <br />If descnption2 = "End" Then <br />Act i veCell. Enti reRow .Delete <br />Exit Do <br />End If <br />If Not description2 = Description Then <br />Range(ActJ veCeII.Offset(O. ....f). Acti vcCc 11.5 pecialCe Ils(x ICellTypc LaslCell) ).Cut <br />Description = description2 <br />Workbooks.Add <br />Rows(" 1: I ").Fonnula = headerrow <br />Range(" A2").Activate <br />ActiveSheet.Paste <br />Range("E2").Aclivale <br />End If <br />Loop <br /> <br />I <br />I <br /> <br />Do <br />Xsname = Range("E2").FonnulaR Ie 1 <br />If Xsname = .", Then <br />Exit Do <br />End If <br />ActivcWorkbook.SaveAs Filcname:=Xsnume. FileFomlut:=xITexl <br />ActivcWorkbook.Close (False) <br />Loop <br /> <br />End Sub <br /> <br />I <br />I <br /> <br />.12 <br />