[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3588
  • Last Modified:

Modify (customize) size of indent in Excel

Hello,

In Excel (2007), is there any way to change or customize the default size of indents?

I am not referring to the width of columns but rather, the indent inside a given cell which can be accessed in two different ways (that I know of):

1)  > Ribbon Home tab > Alignment section > Increase Indent or Decrease Indent buttons

2)  > Ribbon Home tab > Alignment section > bottom-right expansion button > Text alignment > Indent box

The second option allows you to set the number of desired indents, but unfortunately, not the width of each indent.  It is this width with which I am struggling.  If anyone knows how to reset or modify that, I would appreciate knowing.

Thanks
0
Steve_Brady
Asked:
Steve_Brady
  • 2
  • 2
1 Solution
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
Hello Steve,

I don't think you can change the indent size. My empirical tests show that it remains the same, even for different font sizes. You can use code to set the indent level (between 1 and 15) but I have not found any indicator of setting the base size of the indent width.

cheers, teylyn

0
 
TommySzalapskiCommented:
With the macros we discussed a few questions ago you can set them to whatever you want. Then you can add them to the ribbon or a hotkey or both as we discussed then.
Sub IncreaseIndent()
    Selection.InsertIndent 3 'Can be anything (I suppose up to 15)
End Sub
Sub DecreaseIndent()
    Selection.InsertIndent -3
End Sub

Open in new window

0
 
Steve_BradyAuthor Commented:
Thanks for the responses.

>>...you can set them to whatever you want.
>>Selection.InsertIndent 3
>>Selection.InsertIndent -3


Tommy, please correct me if the following is wrong but I believe your code refers to the number of indents to be inserted rather than the width of each individual indent (e.g. it is not possible to have a width of -3).  Only the latter was the object of my question:

>>The second option allows you to set the number of desired indents, but unfortunately, not the width of each indent.  It is this width with which I am struggling.

0
 
TommySzalapskiCommented:
Ah, yes. Sorry. In that case, I agree with teylyn that the indent size is static. You can't change the width of the indent. Pressing the 'increase indent' button runs this line of code
Selection.InsertIndent 1
and just adds an indent. So you can't change the default size of the indent but you can change the number of indents that your custom button or hotkey makes.
If you press 'record macro' and change the indents in both the ways you mention, you'll see that it isn't changing the width, it's changing the number.
0
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
Thanks for the grade, Steve.

However(/if at all) you celebrate the end of the year, I wish you a peaceful holiday season and a great start into a wonderful 2011.

Please keep posting your interesting questions, where you challenge the usability of MS Excel and prop the experts onto their toes.

It's been  very interesting working with you. I appreciate your drive to learn and understand. I'm absolutely amazed at your communication skills. I'm baffled at your sense of humour and how you've managed to drive finicky disagreements into clear-cut statements of what is important to the parties involved.

Steve, I'm pretty sure that without your questions and your feedback to experts, I would not have achieved the rank I have right now in the same time frame.

Maybe in the new year you could consider  answering questions, too. I believe that with your attitude and mindset you would be a great asset to EE.

From a warm NZ mid summer night, I send you my best wishes and hope you will continue to post your challenges at EE in the new year.  (Just remember to check the open questions from time to time. I'm sure you can answer quite a lot of them, and that will open up a completely new aspect of EE).

Kindest regards,

teylyn


0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now