Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 225
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,722
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to convert a static formula to dynamic formula ? Pisistratus Excel Worksheet Functions 3 July 5th 07 01:54 PM
Dynamic Formula with Dynamic Address dmz_asdf Excel Worksheet Functions 7 December 15th 06 07:13 PM
Help with copying dynamic column selected based on remote cell value and dynamic formula fill ers Charts and Charting in Excel 0 March 1st 06 01:05 AM
Help with copying dynamic column selected based on remote cell value and dynamic formula fill ers Excel Programming 0 March 1st 06 01:05 AM
Dynamic Range with unused formula messing up x axis on dynamic graph [email protected] Charts and Charting in Excel 2 February 2nd 06 08:02 PM


All times are GMT +1. The time now is 04:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"