+ Reply to Thread
Results 1 to 5 of 5

Value of a cell equals one of the values in a column then

  1. #1
    Registered User
    Join Date
    06-24-2009
    Location
    Royersford, Pa
    MS-Off Ver
    Excel 2007
    Posts
    89

    Value of a cell equals one of the values in a column then

    My title will be changed once I can better explain myself so that people looking for this in the future will be able to find it.

    Situation is: I have a column that lists percentages from (column A) 75% up to 125%. The very next column (column B) has values that correlate to the percentages. On the same sheet I'm putting together a simple calculator that will calculate a percentage. If the calculated percentage equals one of the percentages in Column A I'd like to fill in another cell with the correlating value from Column B.

    Any help would be much appreciated

    Thanks!
    Last edited by Cjax; 11-24-2010 at 01:47 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Value of a cell equals one of the values in a column then

    Have you looked at Vlookup or Lookup?

    e.g. if you values in column A are in ascending order, then

    =Lookup(X1,A:B) or =Vlookup(X1,A:B,2)

    if the Values are not in ascending order, then

    =Vlookup(X1,A:B,2,0)

    where X1 contains the percentage value to find in column A.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    06-24-2009
    Location
    Royersford, Pa
    MS-Off Ver
    Excel 2007
    Posts
    89

    Re: Value of a cell equals one of the values in a column then

    First of all.......Thank YOU!!! That worked well.

    The only thing I had a problem with was the fact that if the percentage was outside of the listed range then you were left with "#N/A". I changed the formula to look like this.

    =IF(AND(I9>=C7,I9<=C57),VLOOKUP(I9,C7:D56,2),0)

    This works fine with the exception of the following:

    The spreadsheet I created is for comissions. 95% of the time people will be between 75% and 125% of their budgets which is what's represented in Column A. The structure I'm creating is such that if their below 75% they won't receive any commission. But i don't want to penalize them if they happen to be above it. I also don't want to make the spreadsheet unruly by adding anything above 125%. So, Can I add something into the formula that will account for anything above 125%? Basically I would just need to say someting like if it's > than 125% then multiply that % times the monthly comission goal which resides at B2.

    Thanks again

  4. #4
    Registered User
    Join Date
    06-24-2009
    Location
    Royersford, Pa
    MS-Off Ver
    Excel 2007
    Posts
    89

    Re: Value of a cell equals one of the values in a column then

    Never mind! I figured it out....this worked for me:

    =IF(AND(I9>=C7,I9<=C57),VLOOKUP(I9,C7:D56,2),IF(I9>C57,I9*B2,0))

    Thanks again,

    I will makr this as solved. Any suggestions for the title?

    Cjax

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Value of a cell equals one of the values in a column then

    How about "Look up a value in a table to return corresponding items" or something like that.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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