Wouldn't even bother with a script if you have it as a spreadsheet etc
Just use an if statementetc.Code:=IF(C5=C6,D6,D5)
Like that right?
I have a spreadsheet of data with top depths only for a number of layers. The spreadsheet is structured as follows (only Layer_name and Top_Depth columns):
Layer_name Top_Depth BottomDepth T-layer 3105.26 3127.21 T-layer 3127.21 3135.31 T-layer 3135.31 3135.31 V-layer 3012 3030.8 V-layer 3030.8 3101 V-layer 3101 3108.2 V-layer 3108.2 3112.6 V-layer 3112.6 3112.6 Y-layer 3305 3305.9 Y-layer 3305.9 3327.2 Y-layer 3327.2 3331.6 Y-layer 3331.6 3331.6 Z-layer 2916 3014 Z-layer 3014 3014
I would like to do the following: (desired results are shown in red in the bottom depth column)
1. Add a third column called Bottom_Depth
2. In each layer, take the top depth of the next line to be the bottom depth of the previous line
3. When it reaches the end of that layer, it will copy the top depth to the bottom depth column.
4. It then continues with part 1 and part 2 above for the next layer.
How do I achieve this with a script? There are 900 layers, each layer with at least 10 lines (rows) of depths.
There are currently 1 users browsing this thread. (0 members and 1 guests)