+ Reply to Thread
Results 1 to 3 of 3

Dynamic MAx formula

Hybrid View

  1. #1
    Registered User
    Join Date
    10-09-2013
    Location
    London,England
    MS-Off Ver
    Excel 2003
    Posts
    6

    Dynamic MAx formula

    Hi, the code below is a hard-coded version of what I require.
    Below I have columns C and U, however I nned to vary these with column headings,

    so currently 'Letter Cycle' is Column C and 'Days Late' is Column U. But these may vary?
    AN help on creating a dynamic code is much appreciated

    Range("T3").FormulaArray = "=MAX(($C$3:$C$10000=$C3)*($U$3:$U$10000))"

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Dynamic MAx formula

    You can't assign a formula like that, formulaarray needs r1c1 style references.

    Range("T3").formulaarray = "=MAX((r3c3:r10000C3=r[]c3)*(r3c21:r10000c21))"
    To make it dynamic:
    Sub macro_1
    dim LetterCycle, Dayslate
    LetterCycle = 3
    Dayslate = 21
    Range("T3").formulaarray = "=MAX((r3c" & LetterCycle & ":r10000C" & LetterCycle & "=r[]c" & LetterCycle & ")*(r3c" & Dayslate & ":r10000c" & Dayslate & "))"

  3. #3
    Registered User
    Join Date
    10-09-2013
    Location
    London,England
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Dynamic MAx formula

    Thank you - extremely helpful

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Dynamic table formula for sorting data to another table dynamic
    By 650dozer in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-21-2012, 07:22 PM
  2. Replies: 0
    Last Post: 02-28-2006, 09:10 PM
  3. Replies: 0
    Last Post: 02-28-2006, 09:10 PM
  4. Replies: 0
    Last Post: 02-28-2006, 09:10 PM
  5. Dynamic Range with unused formula messing up x axis on dynamic graph
    By cabybake@yahoo.com in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 02-02-2006, 04:10 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1