Thylorion
Thylorion

Reputation: 105

Auto-filling cells with MAX, MIN, Average

My project needs to span two years, so I will rely a lot on the autofill feature for my formulas. The problem is when I go and autofill MAX, MIN, AVERAGE functions, it does not autofill the way I want it to.

Here is what I need to happen when I autofill:

Day 1 | =MIN(A1:A1)
Day 2 | =MIN(A1:A2)
Day 3 | =MIN(A1:A3)
Day 4 | =MIN(A1:A4)
Day 5 | =MIN(A1:A5)
Day 6 | =MIN(A1:A6)
Day 7 | =MIN(A1:A7)

I need the first cell to remain fixed, but be able to have the last cell increase by one cell each day, but the Autofill feature does not work that way.

Or is there something that I am missing?

Upvotes: 0

Views: 493

Answers (2)

Rajesh Sinha
Rajesh Sinha

Reputation: 197

Better use VBA instead of doing the same manually, you can use this one with timer code.

Sub Smallest()

Dim rng As Range Dim dblMin As Double

Set rng = Sheet1.Range("A1:A10")

dblMin = Application.WorksheetFunction.Min(rng)

End Sub

This is a simple VBA code will help you to set Time to run the Macro,, Application.OnTime TimeValue("09:00:00"), Procedure:="MyMacro", Schedule:=True

Upvotes: 0

Gary's Student
Gary's Student

Reputation: 96771

In B1 enter:

=MIN($A$1:A1)

and copy down

Upvotes: 3

Related Questions