Link to home
Create AccountLog in
Avatar of John Darby
John DarbyFlag for United States of America

asked on

Excel autonumber in column 1 based on level of indent in column 2

I have a spreadsheet with Column 2 containing tasks for a project. In column one, I would like to have an autonumber feature, (1,2,3,3.1,3.2,3.3,4.11,4.12, etc) which does the following:

1. Determine the level of indent on the cell adjacent right (column 2)
2. Increment based upon the cell above or if indent is "out-dented" incement from last indent of same level

Does this make sense? I am not sure if this is easy or massively difficult. Help me understand and I will go away if this is too hard.

A sample with a column 2 indents is attached.

Thank you!
JohnD
Avatar of Ingeborg Hawighorst (Microsoft MVP / EE MVE)
Ingeborg Hawighorst (Microsoft MVP / EE MVE)
Flag of New Zealand image

Hello,

sounds like wrong tool for the job. Why don't you use Word instead? It's built-in and ready to go.

cheers, teylyn
I'll modify the workbook I created for you.
ASKER CERTIFIED SOLUTION
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of John Darby

ASKER

Dang Martin, that rocks! It also is teaching me how to do it, since I have 3 more levels of indent to create (Cases 5-7).

Thank you Professor! :)
Marty is the master of Excel and VBA! Thank you, my friend!
Thank you for the kind words and I'm glad I was able to help.

In my profile you'll find links to some articles I've written that may interest you.
Marty - MVP 2009 to 2014