How can you ascertain how many "indents" in an excel cell?

G

Guest

I am managing a project and am using the "increase indent" and "decrease
indent" buttons to create my leveling, eg: a level one task would have no
indent. A level two task would have one indent. A level three task would have
two indents. I then would like to filter my columns by indent level.
Therefore, I need how to extract this information from the cell. I note that
if you select Format Cells Alignment, the number of indents is shown under
"Indent". I have tried the "Cell" and "Info" functions, but they do not have
an indent parameter.
Thanks
Sean
 
O

Otto Moehrbach

If you are doing the filtering with a macro, you can use a statement like:
If ActiveCell.IndentLevel = X Then ........
HTH Otto
 
G

Guest

You could also create your own function and generate a helper column. Just
paste this into an excel module in your project.


Function Indent(x As Range) As Integer
Indent = x.IndentLevel
End Function


In your worksheet, enter =Indent(cell reference)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top