+ Reply to Thread
Results 1 to 11 of 11

Help writing IF function

  1. #1
    Forum Contributor
    Join Date
    11-27-2009
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2013 & 2016
    Posts
    409

    Help writing IF function

    Hello,

    I need help with nested if function as per below.

    If J17 falls between 25-29, then in I want to return 2
    If J17 falls between 30-39, then in I want to return 3
    If J17 falls between 40 plus, then in I want to return 4

    How can I write this out?
    Thanks
    ==========
    Bigroo1958
    Austin, Texas
    ==========

  2. #2
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Help writing IF function

    give this a try

    Please Login or Register  to view this content.
    Ernest

    Please consider adding a * if I helped

    Nothing drives me crazy - I'm always close enough to walk....

  3. #3
    Forum Contributor
    Join Date
    11-27-2009
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2013 & 2016
    Posts
    409

    Re: Help writing IF function

    Thanks for the quick reply, this works nicely!!
    Thanks

  4. #4
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Help writing IF function

    no problem---glad I could help....

  5. #5
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Help writing IF function

    If this has been completed to your satisfaction, please set the thread to Solved...If you feel I deserve an increase in my reputation, feel free to click on the star in the lower left of the thread. Remember, someday when you help somebody they may add to your rep points, and it could be me...just a thought...

  6. #6
    Forum Contributor
    Join Date
    11-27-2009
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2013 & 2016
    Posts
    409

    Re: Help writing IF function

    Ok, I need throw a twist to this now, what you gave will works for a total value, can we do this for an average day instead? My Manager just came to me and would prefer an average instead.

    So, if the driver works 3 days and does 15 loads, then he averaged 5 hauls per day and would get $2/load.

    Average 5-5.9/day= $2
    Average 6-7.9/day=$3
    Average >=8/day=$4

    Thanks

  7. #7
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Help writing IF function

    what column is the average in?...adjust the IF statement to something like this.

    Please Login or Register  to view this content.
    that should work depending on where the average is located...OR do you have to calculate the average and you need help with that?

  8. #8
    Forum Contributor
    Join Date
    11-27-2009
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2013 & 2016
    Posts
    409

    Re: Help writing IF function

    judgeh59,

    The average will be the total value in J17. If formula as you have with average within it.
    Is that possible?

  9. #9
    Valued Forum Contributor
    Join Date
    04-27-2015
    Location
    Abu Dhabi, U.A.E
    MS-Off Ver
    Office 365 | 2016
    Posts
    696

    Re: Help writing IF function

    =if(and((j17/5)>=5,(j17/5)<=5.9),2,if(and((j17/5)>=6,(j17/5)<=7.9),3,if((j17/5)>=8,4,0)))

  10. #10
    Forum Contributor
    Join Date
    11-27-2009
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2013 & 2016
    Posts
    409

    Re: Help writing IF function

    Wonderful guys,

    I decided to add in a cell which will calculate the average in addition to the total, so I am good to go!
    Thanks

  11. #11
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Help writing IF function

    glad we could help....thanks for the rep points

+ 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. Replies: 5
    Last Post: 09-15-2014, 12:41 AM
  2. [SOLVED] Writing a function
    By frisbie17 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-10-2012, 10:35 AM
  3. writing function in VBA
    By johnboy12 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-21-2008, 05:23 PM
  4. Writing a Function
    By svaiskau in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-14-2007, 06:23 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