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.
For example:
In this table, i have in column A:A my indent value.
I calculate in column B:B the lenght of each cell A:A
My goal is to populate in column C:C, for each cell the formula: =subtotal(9;range), where the range is limited by the lenght number. It should only create the formula if the lenght of the next cell if superior, if it is equal it should be blank.
In this example, all the blues values are obtain in the formula =subtotal(9;range), the range should check the lenght of the column B:B, start the next cell and finish until the lenght is superior.
It is hard to explain.
Sorry,
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.
For example:
indent | lenght | Formula |
F.91.04 | 7 | 150 |
F.91.04.01 | 10 | 60 |
F.91.04.01.07 | 13 | 30 |
F.91.04.01.07.01 | 16 | 10 |
F.91.04.01.07.04 | 16 | 20 |
F.91.04.01.12 | 13 | 30 |
F.91.04.01.12.07 | 16 | 30 |
F.91.04.80 | 10 | 90 |
F.91.04.80.01 | 13 | 40 |
F.91.04.80.02 | 13 | 50 |
F.91.05 | 7 | 260 |
F.91.05.02 | 10 | 260 |
F.91.05.02.01 | 13 | 260 |
F.91.05.02.01.01 | 16 | 210 |
F.91.05.02.01.01.80 | 19 | 210 |
F.91.05.02.01.01.80.01 | 22 | 60 |
F.91.05.02.01.01.80.02 | 22 | 70 |
F.91.05.02.01.01.80.03 | 22 | 80 |
F.91.05.02.01.02 | 16 | 10 |
F.91.05.02.01.03 | 16 | 10 |
F.91.05.02.01.04 | 16 | 10 |
F.91.05.02.01.05 | 16 | 10 |
F.91.05.02.01.07 | 16 | 10 |
In this table, i have in column A:A my indent value.
I calculate in column B:B the lenght of each cell A:A
My goal is to populate in column C:C, for each cell the formula: =subtotal(9;range), where the range is limited by the lenght number. It should only create the formula if the lenght of the next cell if superior, if it is equal it should be blank.
In this example, all the blues values are obtain in the formula =subtotal(9;range), the range should check the lenght of the column B:B, start the next cell and finish until the lenght is superior.
It is hard to explain.
Sorry,
Gonçalo