How to detect the indentation level WITHOUT a macro!

ai18ma

New Member
Joined
Feb 20, 2007
Messages
9
Good Day,

Is there a way to figure out the indentation without VBA Code? For various reasons, a macro is the last resort for this operation.
I'm trying to create some sort of numbering for the adjacent cells according to their indent level (IL) Something like this:
IL = 0 (i.e. no indent) => 1st Level Numbering (1, 2, 3, etc)
IL = 1 => 2nd Level Numbering (1.1, 2.1, etc)
IL = 2 => 3rd Level Numbering (1.1.1, 2.1.2, etc)

And so on.
A related question:
What's a better way of generating the numbering level?
Thanks for the help in advance.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
What do you mean with indentation?

Is the data in the cells indented with spaces?
Is the data indented by jumping to next columns?
Or are you using data grouping to create an outline?
 
Upvote 0
What do you mean with indentation?

Is the data in the cells indented with spaces?
Is the data indented by jumping to next columns?
Or are you using data grouping to create an outline?

Good Day Hermanito and thanks for the quick reply.

The data is indented using the "Increase Indent" icon on the Formatting Toolbar, no spaces.
I'm not using data grouping either.
Column "A" shall contain the numbers;
Column "B" shall contain the texts:
Col. A      Col. B
1.           First Level Outline
 1.1           Second Level Outline (Increase Indent, once on both A & B)
   1.1.1        Third Level Outline (Increase Indent, twice on both A & B)
 
Upvote 0
Aha, indentlevel like that, didn't think of that one; thought I had it all covered with my 3 options :biggrin:

I'm afraid it can't be detected without VBA. Can you elaborate why this is not an option for you?
 
Upvote 0
Good Day again,

Sorry for taking a bit too long to reply.

Got a more basic question though:
Does Excel have the sort of indented numbering available in Word?
If not, how could it be done in Excel?
I was trying to it with indents and then detecting their levels and assigning numbers to each level.
What's a better of doing it in Excel?

I'm a bit reluctant using VBA, because I have the impression it slows down opening as well saving the file.
I have a habit of clicking on the Save button almost after every change; leftover from the bad old days of frequent system crashes. With an embedded VBA Code, saving is not immediate.
Besides, I find functions easier to work with than VBA, have little experience with it.
 
Upvote 0
The reason one would want to not use a macro/VBA or a user-defined function is that this book workbook may have to shared to others as an individual file or on network in a macro-free format. Hence having an personal.xlam or personal.xlsb is out of question and also the same goes to having the workbook saved as .xlsm.

Having said that, is there a solution to check indentation level by means of in-cell formula. The most common reason for knowing the indentation level @ai18ma is to construct another formula for that very numbering you are asking.
 
Upvote 0

Forum statistics

Threads
1,224,527
Messages
6,179,328
Members
452,907
Latest member
Roland Deschain

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top