View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Push value to a cell attribute?

Hi G,

Try:

'============
Public Sub IndentIt(Rng As Range, indentNum As Long)
Rng.IndentLevel = indentNum
End Sub
'<<============

Use like:

'============
Public Sub TestIt()
IndentIt Range("A1:A10"), 3
End Sub
'<<============

The indenting can be performed from the Format | Cells menu.

---
Regards,
Norman



"G Lykos" wrote in message
...
Greetings! Am having difficulty imagining an algorithm so am looking for
guidance.

Would like to manipulate the "indent" attribute of a column of cells that
contains text. It would seem that a VBA function is needed, and it would
be
fed a target cell absolute location and an indent value. Is this then a
single-cell formula, invoking the function and passing it a target cell
location and an indent value? Is entering the formula with function and
parameters in a cell and then "enter"ing sufficient to cause it to
process?
Is there a way to arrange this to make it easy to apply the function to a
column of adjacent cells using drag/copy, perhaps with corresponding
columns
of target cell locations and indent values?

Thanks for your ideas!
George