Hello All ......
I need to create a "reference" or "sequence" number like seen in the number column below. This number would only be created when "Weekend Pass" is in the type column and would need to loop through all rows in the worksheet. The quantity and type columns are the only columns with existing data. Any ideas?
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD="align: center"]Number[/TD]
[TD="align: center"]Quantity[/TD]
[TD="align: center"]Type[/TD]
[/TR]
[TR]
[TD="align: center"]001[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]Weekend Pass with Night Access[/TD]
[/TR]
[TR]
[TD="align: center"]002[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]Weekend Pass with Night Access[/TD]
[/TR]
[TR]
[TD="align: center"][/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]Night Access[/TD]
[/TR]
[TR]
[TD="align: center"]003, 004[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]Weekend Pass[/TD]
[/TR]
[TR]
[TD="align: center"]005[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]Weekend Pass with Night Access[/TD]
[/TR]
[TR]
[TD="align: center"]006, 007[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]Weekend Pass[/TD]
[/TR]
[TR]
[TD="align: center"][/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]Monthly[/TD]
[/TR]
[TR]
[TD="align: center"]008[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]Weekend Pass[/TD]
[/TR]
[TR]
[TD="align: center"]009[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]Weekend Pass with Night Access[/TD]
[/TR]
[TR]
[TD="align: center"][/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]Monthly[/TD]
[/TR]
[TR]
[TD="align: center"]010, 011, 012[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]Weekend Pass[/TD]
[/TR]
[TR]
[TD="align: center"][/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]Monthly[/TD]
[/TR]
[TR]
[TD="align: center"][/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]Night Access[/TD]
[/TR]
[TR]
[TD="align: center"][/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]Night Access[/TD]
[/TR]
[TR]
[TD="align: center"]013[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]Weekend Pass with Night Access[/TD]
[/TR]
[TR]
[TD="align: center"]014[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]Weekend Pass[/TD]
[/TR]
</tbody>[/TABLE]
I need to create a "reference" or "sequence" number like seen in the number column below. This number would only be created when "Weekend Pass" is in the type column and would need to loop through all rows in the worksheet. The quantity and type columns are the only columns with existing data. Any ideas?
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD="align: center"]Number[/TD]
[TD="align: center"]Quantity[/TD]
[TD="align: center"]Type[/TD]
[/TR]
[TR]
[TD="align: center"]001[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]Weekend Pass with Night Access[/TD]
[/TR]
[TR]
[TD="align: center"]002[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]Weekend Pass with Night Access[/TD]
[/TR]
[TR]
[TD="align: center"][/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]Night Access[/TD]
[/TR]
[TR]
[TD="align: center"]003, 004[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]Weekend Pass[/TD]
[/TR]
[TR]
[TD="align: center"]005[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]Weekend Pass with Night Access[/TD]
[/TR]
[TR]
[TD="align: center"]006, 007[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]Weekend Pass[/TD]
[/TR]
[TR]
[TD="align: center"][/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]Monthly[/TD]
[/TR]
[TR]
[TD="align: center"]008[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]Weekend Pass[/TD]
[/TR]
[TR]
[TD="align: center"]009[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]Weekend Pass with Night Access[/TD]
[/TR]
[TR]
[TD="align: center"][/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]Monthly[/TD]
[/TR]
[TR]
[TD="align: center"]010, 011, 012[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]Weekend Pass[/TD]
[/TR]
[TR]
[TD="align: center"][/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]Monthly[/TD]
[/TR]
[TR]
[TD="align: center"][/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]Night Access[/TD]
[/TR]
[TR]
[TD="align: center"][/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]Night Access[/TD]
[/TR]
[TR]
[TD="align: center"]013[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]Weekend Pass with Night Access[/TD]
[/TR]
[TR]
[TD="align: center"]014[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]Weekend Pass[/TD]
[/TR]
</tbody>[/TABLE]