+ Reply to Thread
Results 1 to 4 of 4

Add a condition to an existing IF function

  1. #1
    Registered User
    Join Date
    08-13-2014
    Location
    Australia
    MS-Off Ver
    365
    Posts
    25

    Add a condition to an existing IF function

    Hello, thanks in advance for any help.

    I have a formula I have been using which works fine but I then have to manually go and correct the result sometimes and I was hoping that I might be able to adjust the formula to add the additional parameter but I don't know how to do it. I have looked and Google'd but can't seem to get it right.

    The formula I am using is: =IF(ISERROR(SUM(AB4/AA4)),"0.20",(SUM(AB4/AA4)))

    This works correctly, but if AA4 <4 I need to go in and manually change the result if AB4 is the same number (eg if both AA$ & AB4 are 2 then the formula returns 1 - which is correct but I need to manually change to .6). This is just done to reflect anything less than 4 being too small a sample size.

    Is there a way to add to the existing formula to say if both numbers are less than 4 and are both the same then the formula should return .6 as the result.

    Hope I have explained it properly.

    many thanks again
    Last edited by blogger153; 05-26-2022 at 10:20 PM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,530

    Re: Unsure about right formula

    First, I am going to help because I can see what you want to do, but your thread title isn't descriptive of your question. Usually I would flag it as a title violation but I'm going to just change it since I want to help answer this.

    First, you are returning a string. I'm sure that you want to return a number instead, so remove the quotes.
    Second, there is no need to use the SUM function to enclose an arithmetic operation. SUM is for taking the sum of a list of values.
    Third you will get a cleaner formula using IFERROR.

    Here is a revised formula that does what your original does:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Now here it is with the added logic you requested:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    08-13-2014
    Location
    Australia
    MS-Off Ver
    365
    Posts
    25

    Re: Add a condition to an existing IF function

    Thank you so much - that seems to work great. Sorry about posting the wrong thread title.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,530

    Re: Add a condition to an existing IF function

    Glad to help!

    If your question has been answered please mark your thread as "Solved" so that members will know by looking at the thread title that your problem is solved. Go to the menu immediately above your first post to the thread and click on Thread Tools. From the dropdown menu select "Mark this thread as solved..."

    If a member helped you solve your problem, consider adding to their reputation by clicking addreputationiconsmall.jpg below their name.

+ 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: 10
    Last Post: 02-08-2022, 09:32 AM
  2. [SOLVED] Unsure How to Complete This Formula
    By Jim Clayton in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-14-2018, 11:48 AM
  3. [SOLVED] Need a formula but unsure which one it is
    By Steviefiege in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-11-2017, 07:45 AM
  4. Unsure of Formula to Use- IF function?
    By bmc8963 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-07-2017, 04:13 PM
  5. Replies: 2
    Last Post: 11-28-2016, 09:27 PM
  6. Looking for help with a formula as unsure how to do it
    By SophieLove81 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-20-2014, 12:21 PM
  7. [SOLVED] unsure how to wite IF formula
    By oceanside in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-14-2013, 11:32 PM

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