+ Reply to Thread
Results 1 to 9 of 9

Evaluate and return value per given criteria

  1. #1
    Registered User
    Join Date
    12-04-2014
    Location
    Phoenix, Arizona
    MS-Off Ver
    2013
    Posts
    18

    Evaluate and return value per given criteria

    Problem Statement:

    Using given criteria return;
    1) first value (absolute), moving left to right, that falls within the specified criteria for that item or if none found then return first value found in the row, or
    2) the number one, if it exists, if not, then return zero,
    for each row of the raw data set.

    Example files attached.

    I'm not sure what to do with this. I'm looking for some ideas or something.

    Thanks!
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,535

    Re: Evaluate and return value per given criteria

    I don't understand the logic. In H3 the value zero is the minimum for ID 1 however it is not the value chosen as being 'Actual'. On the other hand in I9 the absolute value of -0.245 is 0.245 which is the minimum for ID 5 and is chosen as being 'Actual'. Is the minimum included as is the case with I9, or excluded, as is the case with H3, or am I missing something?
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  3. #3
    Registered User
    Join Date
    12-04-2014
    Location
    Phoenix, Arizona
    MS-Off Ver
    2013
    Posts
    18

    Re: Evaluate and return value per given criteria

    Sorry for the confusion and thanks for your help.

    There are two different possible types of raw data for any ID.
    1) 0 or 1:
    Return the number one if it exists in any column of the row. Otherwise return zero if one does not exist.
    2) Any other number (non whole numbers):
    Return the first value, moving left to right, that falls within the min/max criteria. If conforming value does not exist then return the first value.

    Does that make sense?


    Thanks!

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,535

    Re: Evaluate and return value per given criteria

    This solution employs four helper columns (IR:IU) to take care of the four cases involve. The formulas for the helper columns respectively are:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Of which the last two are array entered formulas, activated by pressing Ctrl, Shift and Enter simultaneously from the edit mode.
    The formula that populates column F is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Let us know if you have any questions.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    12-04-2014
    Location
    Phoenix, Arizona
    MS-Off Ver
    2013
    Posts
    18

    Re: Evaluate and return value per given criteria

    That works as needed. This is very useful. Thank you!

  6. #6
    Registered User
    Join Date
    12-04-2014
    Location
    Phoenix, Arizona
    MS-Off Ver
    2013
    Posts
    18

    Re: Evaluate and return value per given criteria

    I don't see any problems with the sample data but when I copy the formulas over to the another sheet I'm running into problems. For one, when I have only one value in the row or when there are multiple values in the row that do not fall within the criteria range it is resulting in #N/A. Is it the difference between Excel 2010 and 2013 maybe.

    Also, is the H1:Z1 reference a typo?
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,535

    Re: Evaluate and return value per given criteria

    In order to address the #N/A issue lets replace the array entered formula in column IU with another:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Remember that it has to be activated by pressing Ctrl, Shift and Enter simultaneously while in the edit mode.
    As to the H1:Z1 reference in the formula that populates column IT, that sets up an array of column numbers for the formula to work with, so not a typo.
    Let us know if you have any questions.

  8. #8
    Registered User
    Join Date
    12-04-2014
    Location
    Phoenix, Arizona
    MS-Off Ver
    2013
    Posts
    18

    Re: Evaluate and return value per given criteria

    Great! No problems now. Thank you so much!

  9. #9
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,535

    Re: Evaluate and return value per given criteria

    You're Welcome. Thank you for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

+ 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. IF statement in need of improvement to evaluate more criteria
    By waternut in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-04-2016, 03:38 PM
  2. [SOLVED] Difficulty using EVALUATE to convert string to formula and return result
    By phbryan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-27-2016, 10:40 AM
  3. [SOLVED] Sum if range criteria is met then evaluate results and return specified value
    By jbeets in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-23-2015, 02:24 PM
  4. [SOLVED] Evaluate 4 criteria in a spreadsheet
    By Gorbs in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-10-2015, 06:44 AM
  5. [SOLVED] IF formula, to evaluate two columns to return a new value
    By masond3 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-05-2013, 02:08 AM
  6. [SOLVED] Evaluate input and return three possible outcomes
    By sstyre in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-09-2012, 02:50 PM
  7. Converting variant return type from evaluate to integer
    By PJN4 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-07-2009, 12:16 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