+ Reply to Thread
Results 1 to 5 of 5

How to add multiple arguments in a IF function

  1. #1
    Registered User
    Join Date
    12-27-2015
    Location
    jonesboro, ar
    MS-Off Ver
    2014
    Posts
    5

    How to add multiple arguments in a IF function

    Do I use if function to accomplish this? Cell R2 will always have a value between 1 and 30

    if cell F2>27, and cell R2>24, then add 5 to cell Z2.
    if cell F2>27, and cell R2<6, then subtract 5 from cell Z2.
    if cell F2>27, and cell R2>5,R2<11, then subtract 3 from cell Z2.

    If it is false, then I want it to return the value of Z2


    Thanks for any help you could offer me.
    Last edited by mdean32; 12-28-2015 at 10:56 AM. Reason: title

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Need help with a function.

    You could try this one

    =if(and(F2>2,R2>24),z2+5,if(and(F2>2,R2<6),z2-5,Z2))
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Need help with a function.

    Maybe..

    =Z2+(F2>27)*LOOKUP(R2,{1,6,25},{-5,-3,5})
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  4. #4
    Registered User
    Join Date
    12-27-2015
    Location
    jonesboro, ar
    MS-Off Ver
    2014
    Posts
    5

    Re: Need help with a function.

    thanks guys, it worked....

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,049

    Re: Need help with a function.

    mdean, welcome to the forum

    For future reference, please take a moment to read the forum rules and then amend your thread title to something descriptive of your problem - not what you think the answer might be. (think google search terms?). Once you have done this please send me a PM and I will remove this request. (Also, include a link to your thread - copy from the address bar)

    Many members search our previous posts, and thread titles play a big part of the search. I doubt anybody would do a search based on your title?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. Calling function inside function. (aka nested function)
    By jakopak in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-02-2015, 05:58 AM
  2. VBA code for custom function that returns detail results of array function
    By onechipshot in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-10-2015, 06:30 PM
  3. Replies: 13
    Last Post: 04-08-2014, 05:46 AM
  4. Replies: 2
    Last Post: 01-15-2014, 11:40 PM
  5. [SOLVED] IF Function referencing IsNumber, Match, Left function on separate sheets
    By Touch9713 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-12-2013, 10:09 PM
  6. Replies: 1
    Last Post: 03-21-2012, 11:22 AM
  7. Replies: 2
    Last Post: 03-20-2009, 01:29 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