+ Reply to Thread
Results 1 to 4 of 4

IF X = True within a Dynamic Range?

  1. #1
    Registered User
    Join Date
    10-15-2018
    Location
    London, England
    MS-Off Ver
    365
    Posts
    75

    IF X = True within a Dynamic Range?

    Hi All,

    Need some help please...

    I require a formula to achieve the below.


    In cell M21:
    IF L21 = "L" then
    IF( > AVERAGE(B21,C21)+(B21-E21) is listed before
    ( < AVERAGE(B21,C21)-(B21-E21) between B21:$B$9999 then
    return PASS, else return FAIL

    ELSE ""


    This formula would then be copied down throughout the dataset in column M

    I have attached a sample dataset/worksheet

    Any help would be greatly appreciated. Thank you in advanced
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: IF X = True within a Dynamic Range?

    What result are you looking for on row 21? What exactly needs to be bigger than or less than the two average calculations?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    10-15-2018
    Location
    London, England
    MS-Off Ver
    365
    Posts
    75

    Re: IF X = True within a Dynamic Range?

    Hi,

    Apologies for the delayed response.

    I have added to the sample data set to provide a handful of expected results to hopefully better demonstrate my requirements. Whilst I have calculated them manually I need the range lookup to be dynamic as the base data will be frequently updated... all is better described in the attached (Sample Data 2.xlm)

    Thank you
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,824

    Re: IF X = True within a Dynamic Range?

    I'm unclear. I don't know what you mean by "...is listed before"
    Also, in your attachment in the text box, you have

    IF B21:$B$54 (>AVERAGE(B21,C21)+(B21-E21)

    when you have "B21:$B$54" are you saying the AVERAGE of this range? So in English, is it:

    If the average of the values in the cells from B21 to B54 is greater than the average of cells B21 and C21, PLUS B21 - E21, then it's a pass? (again, not sure what you mean by "is listed before"" after this part.)

    You also anchor cell $B$54 but you talk about copying down the formula. Is that really what you want to do? Is it supposed to compare the range that ends before the next "L" in column L?

+ 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] Populate Dynamic Array from Cell Values and write to Dynamic Range
    By TFiske in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-22-2018, 09:09 AM
  2. Replies: 8
    Last Post: 07-04-2016, 02:23 PM
  3. Replies: 6
    Last Post: 03-26-2016, 05:49 PM
  4. Match ComboBox with dynamic range, then add Textbox1 to dynamic range
    By Lasse Moe in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-07-2014, 01:26 AM
  5. Fill Dynamic Range From Dynamic Source Range
    By goss in forum Excel General
    Replies: 2
    Last Post: 03-06-2012, 12:05 PM
  6. setting range().hidden=True causes range error 1004
    By STEVE BELL in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-01-2005, 10:05 PM
  7. [SOLVED] Formula is true if proportion of range is true
    By nussbaum in forum Excel General
    Replies: 3
    Last Post: 01-23-2005, 10:07 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