jocker_boy
Board Regular
- Joined
- Feb 5, 2015
- Messages
- 83
Hello,
I would like to use some macro to populate cells with the formula subtotal(9,"range"), being the range dinamic, based on the lenght of the cell.
In column A i have my indent value.
In column B e calculate the lenght of each cell of column A
The column C is blank and i want to populate each cell with 2 possibilities.
It have to check the value on column B, and compare to the row below.
If the value of the row below is equal or inferior, it must be "blank", if not, will create a formula =subtotal(9,range), the range will start the row below and go until find a lenght equal or inferior.
Many thanks,
Gonçalo
Gonçalo
I would like to use some macro to populate cells with the formula subtotal(9,"range"), being the range dinamic, based on the lenght of the cell.
In column A i have my indent value.
In column B e calculate the lenght of each cell of column A
The column C is blank and i want to populate each cell with 2 possibilities.
It have to check the value on column B, and compare to the row below.
If the value of the row below is equal or inferior, it must be "blank", if not, will create a formula =subtotal(9,range), the range will start the row below and go until find a lenght equal or inferior.
A | B | C (lenght) | D (formula with macro) |
1 | 2 | 1 | =subtotal(9,B2:B7) |
2 | 2.1 | 3 | =subtotal(9,B3:B4) |
3 | 2.1.1 | 5 | |
4 | 2.1.2 | 5 | |
5 | 2.2 | 3 | =subtotal(9,B6:B6) |
6 | 2.2.1 | 5 | |
7 | 2.3 | 3 |
Many thanks,
Gonçalo
Gonçalo