Thanks JE. I've been reading how to define and setup a amcro from some info
on the web...
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_xl2003_ta/html/odc_super.asp
I think I'm on the right track.
Can you have a look at this and make some adjustments to get it to work?
Basically Im just trying to put the indent level in a separate column.
THANKS FOR YOUR HELP!
Sub query_indent()
Dim indent_length
Dim Row
Dim Col
'Not sure if I need all three Dim statements above.
'Select the active worksheet
Set wrkSheet = ActiveWorkbook.ActiveSheet
'indent_length = ActiveCell.IndentLevel
'Start on the second row since the top row is the header
'Range("C2").Value = indent_length
'Start at A2 (i.e. Row 2, Col A)
Row = 2
Col = 1
Contents = ActiveCell.Address(Row, Col).Cell.Value
'It does not like the above statement... can I use Row and Col variables?
'If not, how can I increment through it?
Do While Contents <> " "
indent_length = ActiveCell.IndentLevel
'Now place the indent length in Col C of the same row
ActiveCell.Address(Row, Col + 2).Cell.Select
ActiveCell.Value = indent_length
'Increment to the next row
Row = Row + 1
'Grab the data in the next cell (next row, same col)
ActiveCell.Address(Row, Col).Cell.Select
Loop
End Sub
I guess you can think of the above as psuedo code, but if you can help me
get it right I would certainly appreciate it!
Thank you again. It's 1;10am here (NJ) and I'm going to call it a night.
Cheers!