+ Reply to Thread
Results 1 to 10 of 10

A roblem with modifying a formula for determining the closest value in particular range

  1. #1
    Forum Contributor
    Join Date
    05-01-2014
    Location
    RIX
    MS-Off Ver
    Excel 2003; 2007
    Posts
    114

    A roblem with modifying a formula for determining the closest value in particular range

    I’ve got the formula which makes a word „Order” (column B) meet the closest value of 35.00 (column A)

    How to modify the formula so that ''Order" meets only the first closest value of 35.00 in the range (>=35;<39)

    I've been trying to change the value comparisons to set up the range from 35.00 till 39.00.

    but encountered a problem that "Order'' often meets two closest values of 35 till 39, e.g. 36.50; 34.00.

    "order" must meet only the first closest value of 35.00 in the mentioned range (>=35.00;<39)

    Would you be so kind as to give the matter a reasonable consideration?

    See the workbook attached.

    Thanks in advance
    Attached Files Attached Files
    Regards

    Arty

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,962

    Re: A roblem with modifying a formula for determining the closest value in particular rang

    In B2, use the formula

    =IF(AND($A2>=$D$2*$C$2,$A2<=$D$2,COUNTIF($B$1:B1,$E$2&"")=0),$E$2&"","")
    or
    =IF(COUNTIFS($A$2:$A2,">=" &$D$2*$C$2,$A$2:$A2,"<=" &$D$2)=1,$E$2&"","")
    Last edited by Bernie Deitrick; 05-12-2014 at 10:39 AM.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Forum Contributor
    Join Date
    05-01-2014
    Location
    RIX
    MS-Off Ver
    Excel 2003; 2007
    Posts
    114

    Re: A roblem with modifying a formula for determining the closest value in particular rang

    Using your formula "Order" meets the value of 35.00 just once at the cell B17,

    there are about 360 cells down in the workbook with several approximate values of 35

    What was your plan to create the range (>=35.00;<39.00)?
    Last edited by Arty_1; 05-12-2014 at 10:43 AM.

  4. #4
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,962

    Re: A roblem with modifying a formula for determining the closest value in particular rang

    I guess your requirements were not clear. I thought you did not want Order repeated more than once?

  5. #5
    Forum Contributor
    Join Date
    05-01-2014
    Location
    RIX
    MS-Off Ver
    Excel 2003; 2007
    Posts
    114

    Re: A roblem with modifying a formula for determining the closest value in particular rang

    There are about 20 approximate and precise values of 35.00 in the column A which have to be met by "Order".

  6. #6
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,962

    Re: A roblem with modifying a formula for determining the closest value in particular rang

    Quote Originally Posted by artis_lebedevs@inbox View Post
    There are about 20 approximate and precise values of 35.00 in the column A which have to be met by "Order".
    In your first post, you wrote

    "order" must meet only the first closest value of 35.00 in the mentioned range (>=35.00;<39)
    So, what do you want? Post a workbook with the results you want - don't use formulas, just type "Order" in the cells where you want it to appear, and explain your criteria.

  7. #7
    Forum Contributor
    Join Date
    05-01-2014
    Location
    RIX
    MS-Off Ver
    Excel 2003; 2007
    Posts
    114

    Re: A roblem with modifying a formula for determining the closest value in particular rang

    I agree, I should take my time on detailed explanation of the requirements.

    I've attached the workbook with better explanation (Txt & graphic).
    Attached Files Attached Files

  8. #8
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,962

    Re: A roblem with modifying a formula for determining the closest value in particular rang

    Ok, but that still begs the question - why are you talking about 35 to 40, when you are multiplying 35 by 92% to get the lower limit (32.2) and using 35 as the upper limit. How do you want the limits to be related to those values?

  9. #9
    Forum Contributor
    Join Date
    05-01-2014
    Location
    RIX
    MS-Off Ver
    Excel 2003; 2007
    Posts
    114

    Re: A roblem with modifying a formula for determining the closest value in particular rang

    Thats the question of the thread: A roblem with modifying a formula,-

    consequently how to change/substitute the formula, parameters, value comparisons etc. to meet the requirements!
    Last edited by Arty_1; 05-12-2014 at 06:50 PM.

  10. #10
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,962

    Re: A roblem with modifying a formula for determining the closest value in particular rang

    I understand that, but you need to explain how 35, 92%, and 35 to 40 are related.

+ 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] Modifying vba code .Formula to cell range
    By Excelnoub in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-02-2014, 03:50 PM
  2. [SOLVED] Looking up value by closest match & determining cell address.
    By clique in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-01-2013, 11:40 AM
  3. Multi-range IF formula for determining a schedule
    By CEdwards2 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-26-2012, 06:49 AM
  4. Help determining sum range to insert into formula
    By jhumphrey in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-08-2007, 06:45 PM
  5. Replies: 1
    Last Post: 04-20-2006, 05: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