Hi JE, I haev not gotten it to work. It return a zero no matter if it's
indented or not. I will try to figure it out later. For now one of the
other posts (macro in VBA) works.
Thaks very much for helping me in any case. I very much appreciate it!
NJDevil
"JE McGimpsey" wrote:
Make Jim's solution into a UDF. As you're not familiar with UDFs, read
David McRitchie's "Getting Started with Macros and User Defined
Functions":
http://www.mvps.org/dmcritchie/excel/getstarted.htm
Public Function IndentLevel(Ref As Range) As Long
Application.Volatile
IndentLevel = Ref.IndentLevel
End Function
Call from the worksheet as
B1: =IndentLevel(A1)
to find the indent level of cell A1. Note that even with the
Application.Volatile command, which makes the function recalculate
whenever the worksheet is recalculated, changing the indent level
doesn't fire a worksheet calculation, so you'll need to use F9 to be
sure it's accurate after changing an indent level.
In article ,
"NJDevil" wrote:
Thanks for the reply. However, I don't know how to use that. It sounds
like I need to do some programming to get the info I need. Can you PLEASE
provide me with some code (or how ever you would use it) so that I may
integrate that solution into my spreadsheet? I have spend a lot of time on
this spreadheet and this is the one thing that I really need to make it do
what I need!
Once I have the code, how do I invoke it in Excel? Sorry for being sucha
newby but I'm not an Excel programmer. I really wish I could just invoke a
function, but the '=CELL' function does not let me query the indent length.