+ Reply to Thread
Results 1 to 4 of 4

Dynamic Named Ranges in Formula

  1. #1
    Registered User
    Join Date
    08-11-2014
    Location
    England
    MS-Off Ver
    2013
    Posts
    4

    Dynamic Named Ranges in Formula

    Has anyone successfully used a named range across 2 sheets in an if statement? I am trying to use the below if statement on a set of data that exceeds excels limit. I thought the solution might be to use named ranges across 2 sheets however I don't seem to be able to get the formula to calculate once I extend the named range across 2 sheets. The If statement is set-up so that it will calculate based on filters in rows 1-4.

    =IF(D33<100,COUNTIFS(Retention_Renewal_Status,"<>LAPSED",Retention_Trans_Date,">="&EDATE($A$3,-2),Retention_Trans_Date,"<="&EOMONTH($A$3,0),Retention_Age_of_Rnl,"Y",Retention_Premium_Band,D$3,Retention_Brand,"*"&$C$2&"*",Retention_Source,"*"&$D$2&"*")/COUNTIFS(Retention_Trans_Date,">="&EDATE($A$3,-2),Retention_Trans_Date,"<="&EOMONTH($A$3,0),Retention_Age_of_Rnl,"Y",Retention_Premium_Band,D$3,Retention_Brand,"*"&$C$2&"*",Retention_Source,"*"&$D$2&"*"),IF(COUNTIFS(Retention_Trans_Date,">="&EDATE($A$3,-2),Retention_Trans_Date,"<="&EOMONTH($A$3,0),Retention_Age_of_Rnl,"Y",Retention_Premium_Band,D$3,Retention_Brand,"*"&$C$2&"*",Retention_Source,"*"&$D$2&"*",Retention_Insurer,"*"&$E$2&"*",Retention_Web_Source,"*"&$F$2&"*",Retention_NCD_Band,"*"&$G$2&"*",Retention_Age_Band,"*"&$H$2&"*",Retention_Cover_Level,"*"&$I$2&"*",Retention_Payment_Type,"*"&$J$2&"*")<100,COUNTIFS(Retention_Renewal_Status,"<>LAPSED",Retention_Trans_Date,">="&EDATE($A$3,-2),Retention_Trans_Date,"<="&EOMONTH($A$3,0),Retention_Age_of_Rnl,"Y",Retention_Premium_Band,D$3,Retention_Brand,"*"&$C$2&"*",Retention_Source,"*"&$D$2&"*")/COUNTIFS(Retention_Trans_Date,">="&EDATE($A$3,-2),Retention_Trans_Date,"<="&EOMONTH($A$3,0),Retention_Age_of_Rnl,"Y",Retention_Premium_Band,D$3,Retention_Brand,"*"&$C$2&"*",Retention_Source,"*"&$D$2&"*"),COUNTIFS(Retention_Renewal_Status,"<>LAPSED",Retention_Trans_Date,">="&EDATE($A$3,-2),Retention_Trans_Date,"<="&EOMONTH($A$3,0),Retention_Age_of_Rnl,"Y",Retention_Premium_Band,D$3,Retention_Brand,"*"&$C$2&"*",Retention_Source,"*"&$D$2&"*",Retention_Insurer,"*"&$E$2&"*",Retention_Web_Source,"*"&$F$2&"*",Retention_NCD_Band,"*"&$G$2&"*",Retention_Age_Band,"*"&$H$2&"*",Retention_Cover_Level,"*"&$I$2&"*",Retention_Payment_Type,"*"&$J$2&"*")/COUNTIFS(Retention_Trans_Date,">="&EDATE($A$3,-2),Retention_Trans_Date,"<="&EOMONTH($A$3,0),Retention_Age_of_Rnl,"Y",Retention_Premium_Band,D$3,Retention_Brand,"*"&$C$2&"*",Retention_Source,"*"&$D$2&"*",Retention_Insurer,"*"&$E$2&"*",Retention_Web_Source,"*"&$F$2&"*",Retention_NCD_Band,"*"&$G$2&"*",Retention_Age_Band,"*"&$H$2&"*",Retention_Cover_Level,"*"&$I$2&"*",Retention_Payment_Type,"*"&$J$2&"*")))
    [/I]


    I'm not sure how much sense the formula makes without seeing the whole sheet.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,494

    Re: Dynamic Named Ranges in Formula

    I didn't realise you could do this, but you never know till you try. You can have a Named Range:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    And then you can use, for example:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    However, I can't see a way of making that a Dynamic Named Range.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    08-11-2014
    Location
    England
    MS-Off Ver
    2013
    Posts
    4

    Re: Dynamic Named Ranges in Formula

    Retention_Renewal_Status is one of the named ranges that is across 2 sheets and I get a #Value! error for the whole formula although it will let me count the named range =COUNT(Retention_Renewal_Status,"<>LAPSED")

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,494

    Re: Dynamic Named Ranges in Formula

    I'm not sure how much sense the formula makes without seeing the whole sheet.
    The length of the formula is around 2160 characters which should be OK (in 2013).

    Maybe check if each element of the formula works and build it up section by section?

    Regards, TMS

+ 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. [SOLVED] Index Match Formula in VBA, that utilises Workbook dynamic named ranges
    By JamieW in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-13-2014, 09:39 AM
  2. Named ranges-Should I use a dynamic named range
    By foseco in forum Excel General
    Replies: 4
    Last Post: 06-11-2009, 03:56 PM
  3. Look Dynamic Named Ranges
    By peterkiukas in forum Excel General
    Replies: 11
    Last Post: 11-30-2007, 03:45 PM
  4. Dynamic Named Ranges
    By hitchy79@gmail.com in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 03-09-2006, 11:15 AM
  5. [SOLVED] Help to adapt Formula syntax to work with Dynamic Named Ranges
    By Sam via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 04-28-2005, 08:06 PM

Tags for this Thread

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