Autofill Numbers In Merged Cells

Bugalho

New Member
Joined
Jun 1, 2020
Messages
5
Office Version
  1. 2019
Platform
  1. Windows
I know there are some topics about autofill in merged cells, but I couldn't find what I need. I don't even know if it's possible.


Is there a way to autofill numbers in this kind of table? (see image bellow). There are cells merged in rows and columns. Numbers with 2 or 3 digits, depending on the number of columns.

Webp.net-compress-image.jpg


Best regards
Élson
 
I didn't think it would be possible, the use of a wildcard match to count the number of merged columns is one of those things that I would have never thought of, but now that I've seen it I wonder why I didn't :eek:

I'm going to have a closer look at that formula later, see what else is making it tick.
 
Upvote 0

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
I modified the formula and make it shorter
MrExcel.xlsx
ABCDE
113Chapter Name1
213.1Section Name2
313.1.1Title3
413.1.2Title4
513.1.3Title5
6
713.1.4Title7
813.2Section Name8
913.2.1Title9
1013.2.2Title10
1113.2.3Title11
1213.2.4Title12
1313.2.5Title13
1413.2.6Title14
1513.2.7Title15
1613.2.8Title16
1713.2.9Title17
18
19
2013.2.10Title20
2113.2.11Title21
22
23
24
25
2613.3Section Name26
2713.4Section Name27
2813.4.1Title28
2913.4.2Title29
3013.5Section Name30
3113.5.1Title31
3213.5.2Title32
3313.6Section Name33
3413.6.1Title34
3513.6.2Title35
3613.7Section Name36
3713.7.1Title37
3813.7.2Title38
3913.8Section Name39
4013.8.1Title40
4113.8.2Title41
4213.9Section Name42
4313.9.1Title43
4413.9.2Title44
4513.10Section Name45
4613.10.1Title46
4713.10.2Title47
4813.11Section Name48
4913.11.1Title49
5013.11.2Title50
5113.12Section Name51
5213.12.1Title52
5313.12.2Title53
5414Chapter Name1
5514.1Section Name55
5614.1.1Title56
5714.1.2Title57
5814.1.3Title58
59
6014.1.4Title60
6114.2Section Name61
6214.2.1Title62
6314.2.2Title63
6414.2.3Title64
6514.2.4Title65
Sheet3 (3)
Cell Formulas
RangeFormula
A60:A65,A26:A58,A20:A21,A2:A5,A7:A17A2=A$1+COUNTA(C$2:C2)&IF(C2="","."&COUNTA(INDEX(D:D,LOOKUP("々",C$1:C1,ROW($1:1))):D2)&IF(E2="","","."&COUNTA(INDEX(E:E,LOOKUP("々",D$1:D1,ROW($1:1))):E2)),"")
 
Upvote 0
Shorter again,

=A$1+COUNTA(C$2:C2)&IF(C2="","."&COUNTA(INDEX(D:D,MATCH("々",C$1:C1)):D2)&IF(E2="","","."&COUNTA(INDEX(E:E,MATCH("々",D$1:D1)):E2)),"")
 
Upvote 0
Shorter again,

=A$1+COUNTA(C$2:C2)&IF(C2="","."&COUNTA(INDEX(D:D,MATCH("々",C$1:C1)):D2)&IF(E2="","","."&COUNTA(INDEX(E:E,MATCH("々",D$1:D1)):E2)),"")
Thank you~ I use lookup in the very begining and totally forgot MATCH:cry:
 
Upvote 0
Easily done :)

I tried a few alternatives with things like TEXT(DATE(COUNTA(...))) which do work, but not as well. Too many limitations and a leading zero in one field.

I did notice one potential flaw in the shorter formulas. Using the example in post 13, enter some text into E18, then check the results of A17 and A20. Multiple entries against a single label with merged rows causes numbers to be missed. I think that your original suggestion in post 9 maintained the correct sequence.
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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