# can tthis countdown be done

#### Acehole

##### Board Regular
hello,
trying to count down from a number in a cell, C3 for exmaple, this will contain a random number.
i want excel to see this number then populate the rest of the cells c4 c5 c6 etc with the number decreasing.
so c3 will be 25 c4 will be 24 c5 will be 23 until it gets to 1
can this be done ?

regards

acehole

### Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

#### MickG

##### MrExcel MVP
One way:-
Code:
``````[COLOR="Navy"]Sub[/COLOR] MG20Mar52
[COLOR="Navy"]Dim[/COLOR] Tem [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Integer[/COLOR]
[COLOR="Navy"]With[/COLOR] Range("C3")
Tem = .value
.value = 1
.AutoFill Destination:=Range("C3").Resize(Tem), Type:=xlFillSeries
.Resize(Tem).Sort Range("C3"), xlDescending
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]With[/COLOR]
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]``````
Regards Mick

#### Acehole

##### Board Regular
Wow,
that works a treat as I suspected the forum would come up with the goods,
final question if possible
i have the numbers now counting down in cell c3 onwards
the cells a3 and b3 have information I would like to copy down to the last number in cell c
so it would look like this
a3. B3. C3

1234. 5. 25
1233. 5. 24
1234. 5. 23

cells a and b will not increase or decrease in value just need to copy down

thanks for the help
Acehole

#### MickG

##### MrExcel MVP
If you're referring to my code then try this:-

Code:
``````[COLOR="Navy"]Sub[/COLOR] MG20Mar43
[COLOR="Navy"]Dim[/COLOR] Tem [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Integer[/COLOR]
[COLOR="Navy"]With[/COLOR] Range("C3")
Tem = .value
.value = 1
.AutoFill Destination:=Range("C3").Resize(Tem), Type:=xlFillSeries
.Resize(Tem).Sort Range("C3"), xlDescending
Range("A3:B3").Resize(Tem).value = .Offset(, -2).Resize(, 2).value
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]With[/COLOR]
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]``````
Regards Mick

#### Acehole

##### Board Regular
Hi mick thank you for the replies
i am trying your formula now but can't get it to work, being a novice I guess I am putting the code in the wrong place?
any suggestions
thanks
acehole

#### Acehole

##### Board Regular
hi Mick,
when your code runs i get this error message come up on this line

.AutoFill Destination:=Range("C3").Resize(Tem), Type:=xlFillSeries

looks like it fills the numbers down but not the columns a and b and their infomation

regards
acehole

#### Acehole

##### Board Regular
perfect, thank you very much for the help
regards
acehole

#### dispelthemyth

##### Well-known Member
Apologies, use the below, its a slight amendment, i didnt lock the check if cell is blank to column C

Excel Workbook
ABC
1
2
31234525
41234524
51234523
61234522
71234521
81234520
Sheet1

### Forum statistics

Threads
1,089,224
Messages
5,406,951
Members
403,113
Latest member
ms_excel_recal_or_die