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

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
If you are doing the filtering with a macro, you can use a statement like:
If ActiveCell.IndentLevel = X Then ........
HTH Otto
 
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)
 
Back
Top