Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dynamic MAX formula
Hi,
I'm looking for a way to have the MAX & MIN values of a dynamic range. This one gives me a compile error Range("A5").Select ActiveCell.Formula ="=MAX("A7:A" & selection.currentregion.rows.count)" any help welcome Regards, Ludo |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dynamic MAX formula
In the second line you don't need the quote before A7: it should be
ActiveCell.Formula = "=MAX(A7:A" & Selection.CurrentRegion.Rows.Count & ")" I suspect the formula still isn't quite doing what you want though - maybe it should be something like: ActiveCell.Formula = "=MAX(A7:A" & (Selection.CurrentRegion.Rows.Count +5) & ")" On 23 Sep, 15:41, Ludo wrote: Hi, I'm looking for a way to have the MAX & MIN values of a dynamic range. This one gives me a compile error * * Range("A5").Select * * ActiveCell.Formula ="=MAX("A7:A" & selection.currentregion.rows.count)" any help welcome Regards, Ludo |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dynamic MAX formula
Quotation marks were in the wrong place:
Range("A5").Select ActiveCell.Formula = "=MAX(A7:A" & _ Selection.CurrentRegion.Rows.Count & ")" -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "Ludo" wrote: Hi, I'm looking for a way to have the MAX & MIN values of a dynamic range. This one gives me a compile error Range("A5").Select ActiveCell.Formula ="=MAX("A7:A" & selection.currentregion.rows.count)" any help welcome Regards, Ludo |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to convert a static formula to dynamic formula ? | Excel Worksheet Functions | |||
Dynamic Formula with Dynamic Address | Excel Worksheet Functions | |||
Help with copying dynamic column selected based on remote cell value and dynamic formula fill | Charts and Charting in Excel | |||
Help with copying dynamic column selected based on remote cell value and dynamic formula fill | Excel Programming | |||
Dynamic Range with unused formula messing up x axis on dynamic graph | Charts and Charting in Excel |