# Formula (not VBA or UDF) to produce the pattern - 4 4 4 4 3 3 3 2 2 1

#### circledchicken

##### Well-known Member
Hi all,

Does anyone know, or can you help me come up with a formula (to be entered in a single cell and dragged down), that produces this pattern:

4 4 4 4 3 3 3 2 2 1

The formula would be given a starting value (4 in the case above) and continue down to 1.
So for example if the starting value was changed to 5, then it would become:

5 5 5 5 5 4 4 4 4 3 3 3 2 2 1

if it was changed to 6 it would become:

6 6 6 6 6 6 5 5 5 5 5 4 4 4 4 3 3 3 2 2 1

etc.

I want this to be a single formula that I can drag down (I don't want a VBA or UDF solution).

Many thanks to all you good people for taking the time to look at this!

### Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use \$ signs: \$V\$2:\$Z\$99 will always point to V2:Z99, even after copying
Try this.

Put the number of interest in A1.
Formula in A2 is copied down as far as you might ever need.

Excel Workbook
A
14
24
34
44
53
63
73
82
92
101
11
12
13
Triangular Numbers

Simpler..

Excel Workbook
A
14
24
34
44
53
63
73
82
92
101
11
12
13
Triangular Numbers 2

Peter,

These are so cool, thankyou very much sir!
I really appreciate your help and ability to figure this out so quickly!

Thankyou and have a great weekend!!

Peter,

These are so cool, thankyou very much sir!
I really appreciate your help and ability to figure this out so quickly!

Thankyou and have a great weekend!!
No problem, glad you liked it.
(I am having a great weekend, though it is already half over in this part of the world)

Peter said:
=IF(OR(A1={1,""}),"",A1-(COUNTIF(A\$1:A1,A1)=A1))
Nice.

one more use in A2 and Drag down

Excel Workbook
A
16
26
36
46
56
66
75
85
95
105
115
124
134
144
154
163
173
183
192
202
211
sample

<a1,a1,a1-1))< html=""></a1,a1,a1-1))<>

Thanks kevatarvind! - that's a nice one too - !!

Replies
0
Views
61
Replies
3
Views
94
Replies
13
Views
289
Replies
14
Views
174
Replies
41
Views
673

1,196,155
Messages
6,013,759
Members
441,781
Latest member
Gian Carlos

### 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.

### Which adblocker are you using?

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

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