Hi,
I am wondering if it possible to have VBA code to automatically format cells based on a formula finding the next available occupied cell.
Data at present
<tbody>
</tbody>
So the formula in the first column is =IF(B2=1,COUNT($A$1:A1)+1,"")
What i now would like is to add some VBA code in to my current macro which does various other bits of work in the workbook to format the table, something like the below
looking down column A it selects the blanks up to and including the occupied cell, selects all occupied cells in them rows and creates thick box border to seperate the routes
Many thanks for any help
Mick
I am wondering if it possible to have VBA code to automatically format cells based on a formula finding the next available occupied cell.
Data at present
Route | Loading Order | Destination | Dest Ref | |||||||||||
2 | a | |||||||||||||
1 | 1 | b | ||||||||||||
2 | c | |||||||||||||
2 | 1 | d | ||||||||||||
4 | e | |||||||||||||
3 | f | |||||||||||||
2 | g | |||||||||||||
3 | 1 | h | ||||||||||||
<tbody>
</tbody>
So the formula in the first column is =IF(B2=1,COUNT($A$1:A1)+1,"")
What i now would like is to add some VBA code in to my current macro which does various other bits of work in the workbook to format the table, something like the below
looking down column A it selects the blanks up to and including the occupied cell, selects all occupied cells in them rows and creates thick box border to seperate the routes
Many thanks for any help
Mick