InsertIndent

  • Thread starter Thread starter Bernd Kuegle
  • Start date Start date
B

Bernd Kuegle

How can I check if the text in a cell is indented? I tried it with this
code, but it doesn´t work:

if cells(5, 1).InsertIndent = 1 then ...


Many thanks
Bernd
 
Bernd

Try something like this

Sub test()
If Range("A1").IndentLevel > 0 Then
MsgBox "There is an indent of " & Range("A1").IndentLevel
End If
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
 

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

Back
Top