+ Reply to Thread
Results 1 to 10 of 10

if formula dependent on the value of cells

  1. #1
    Forum Contributor
    Join Date
    10-18-2012
    Location
    new york
    MS-Off Ver
    Office 365
    Posts
    177

    if formula dependent on the value of cells

    Hi, I have a table with actual results and metrics for what these mean e.g:

    Measurement Result Excellent Good Average Poor
    Number of Apples 45 50 40 30 20
    Number of Bananas 30 10 20 30 40

    I need a formula that will generate either 'excellent', 'good', 'average' or 'poor' depending on the result and the metrics specified. I must have only one formula because the sheet will not be used by me and the details will be put in by other users. So I need a formula that will calculate it depending on whether the higher the better or the lower the better...if this makes sense...so something like if excellent is less than good do this and if excellent is more than good do this.

    have the following formula:
    =IF((S50>=J50),"Excellent",(IF(OR(S50<P50),"Poor",(IF(OR(S50<M50),"Average","Good")))))

    This works perfectly for when the higher the better but it doesn't take into account when the lower the better....

    Any help would be much much appreciated

  2. #2
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: if formula dependent on the value of cells

    Upload a sample showing what you have and what you want to see, and WHY it should return that result please
    A picture may be worth a thousand words, BUT, a sample Workbook is worth a thousand screenshots!
    -Add a File - click advanced (next to quick post), scroll to manage attachments, click, select add files, click select files, select file, click upload, when file shows up at bottom left, click done (bottom right), click submit
    -To mark thread Solved- go top of thread,click Thread Tools,click Mark as Solved
    If you received helpful response, please remember to hit the * of that post

  3. #3
    Forum Contributor
    Join Date
    10-18-2012
    Location
    new york
    MS-Off Ver
    Office 365
    Posts
    177

    Re: if formula dependent on the value of cells

    hi, apologies, i should have done this in the first place.
    here it is, i hope it makes more sense now i want formulas in the results columns...it needs to be one formula!
    thank you
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,293

    Re: if formula dependent on the value of cells

    Is this what your looking for?
    I change the the sequence of the "apple" table
    Attached Files Attached Files
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  5. #5
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: if formula dependent on the value of cells

    Nice solution, popipipo.
    Brendan.


    __________________________________________________________________________________________________
    Things to consider:

    1) You can thank any poster by clicking the * at the left of a helpful post.
    2) You can help to keep the forum tidy by marking your thread as "Solved", if it has been answered to your satisfaction.
    3) Help us to help you, by uploading a sample workbook, showing the type of data you're dealing with, and clearly indicating what the results should be.

  6. #6
    Forum Contributor
    Join Date
    10-18-2012
    Location
    new york
    MS-Off Ver
    Office 365
    Posts
    177

    Re: if formula dependent on the value of cells

    hmm i need the sequence to stay the same because the sheet will not be used by me, the user will put the values in and i don't want them to have to adjust the layout. i need the formula to look at whether the 'excellent' value is higher or lower than the 'good' value and then do the calculation...if this makes sense!

  7. #7
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: if formula dependent on the value of cells

    Using your examplethis in G3:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Copy down

    Note this works the way it is as long as the column titles( the $B# parts) remain the same, other wise they should be changed for each grouping

    In attached, See column H

    Hope this helps

    Edit-
    if you don't like all the if's maybe this in F3:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Copy down
    Attached Files Attached Files
    Last edited by dredwolf; 03-16-2013 at 02:15 PM.

  8. #8
    Forum Contributor
    Join Date
    10-18-2012
    Location
    new york
    MS-Off Ver
    Office 365
    Posts
    177

    Re: if formula dependent on the value of cells

    Hi dredwolf thank you so much, both solutions work perfectly.

  9. #9
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: if formula dependent on the value of cells

    Revised workbook showing both answers in previous post (#7) and 2 variations on the sumproduct answer showing possible ways to get the proper column headers for each section
    Column H (in Blue) shows the nested if solution
    Column I (in Green) shows the original sumproduct solution
    Column J (in Yellow) using the sumproduct solution, and finding the Header row by looking for the last "Date" header, Assumes the text "Date" is in the same row as the headers:
    in I3:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Column K (in Red) using the sumproduct solution, and finding the Header row by looking for the last "Result" header, Assumes the text "Result" is in the same row as the headers:
    In K3:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Hope this helps
    Attached Files Attached Files

  10. #10
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: if formula dependent on the value of cells

    You are welcome

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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