+ Reply to Thread
Results 1 to 14 of 14

Using IF function across a range of cells

  1. #1
    Registered User
    Join Date
    12-20-2016
    Location
    Pretoria, South Africa
    MS-Off Ver
    2013
    Posts
    6

    Post Using IF function across a range of cells

    Good day,

    I wish to do the following but can't seems to get the correct formula

    I have 5 cells (eg G16:G20) that contain either a "pass" or "fail" value. I want to add a formula that looks at these cells and if any one of then contains "fail" then the result must be fail else pass.

    I tried various IF formulas as well as the Countif formula??

    what is the formula for this scenario?
    rgds
    Dave

  2. #2
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Using IF function across a range of cells

    What happened when you tried COUNTIF?

    I would have thought

    Please Login or Register  to view this content.
    would have done the trick?
    If someone has helped you then please add to their Reputation

  3. #3
    Registered User
    Join Date
    12-20-2016
    Location
    Pretoria, South Africa
    MS-Off Ver
    2013
    Posts
    6

    Re: Using IF function across a range of cells

    Hi,

    thanks - but this formula also doe snot work / give desired result - get a formula error. When I use the countif function - I sometimes get a value error message or else name error message. I think it might be something small, but can't it to work. I will add to reputation once I have it working, ciao

  4. #4
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Using IF function across a range of cells

    Can you upload your workbook?

  5. #5
    Registered User
    Join Date
    12-20-2016
    Location
    Pretoria, South Africa
    MS-Off Ver
    2013
    Posts
    6

    Re: Using IF function across a range of cells

    done, first time user not sure where is loads to

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,215

    Re: Using IF function across a range of cells

    To attach a sample workbook.

    Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  7. #7
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Using IF function across a range of cells

    If you do a reply but when in there, hit the "Go Advanced" button.

    Then click the "Manage Attachments" link then click the "Choose a file" on the first field and once the files been chosen click the Upload button (over to the right)

    This will then show the filename in the "Current attachments", scroll to the bottom and select "Close this window"

    Then hit Submit Reply and it should be there

  8. #8
    Registered User
    Join Date
    12-20-2016
    Location
    Pretoria, South Africa
    MS-Off Ver
    2013
    Posts
    6

    Re: Using IF function across a range of cells

    Thanks, loaded the workbook
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Using IF function across a range of cells

    COUNTIF works for me in there?

    Please Login or Register  to view this content.

  10. #10
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,215

    Re: Using IF function across a range of cells

    Using the supplied formula would help!

    =IF(COUNTIF(G16:G20,"Fail"),"Fail","Pass")

    rather than

    =IF(G16:G20="Fail","Fail","Pass")
    Last edited by JohnTopley; 12-20-2016 at 07:23 AM.

  11. #11
    Registered User
    Join Date
    12-20-2016
    Location
    Pretoria, South Africa
    MS-Off Ver
    2013
    Posts
    6

    Re: Using IF function across a range of cells

    Hi, I tried your formula - see doc attached with screen dump of error message
    Attached Files Attached Files

  12. #12
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Using IF function across a range of cells

    Do your regional settings mean you should be using ";" instead of ","?

    try replacing those

  13. #13
    Registered User
    Join Date
    12-20-2016
    Location
    Pretoria, South Africa
    MS-Off Ver
    2013
    Posts
    6

    Re: Using IF function across a range of cells

    Hi
    thanks it worked when I replaced all the "," with ";" - appreciate your help

  14. #14
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,215

    Re: Using IF function across a range of cells

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. Range of copied cells based on the range of a UDF array function
    By katxt in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-30-2016, 08:58 PM
  2. Replies: 6
    Last Post: 04-18-2016, 05:31 PM
  3. [SOLVED] AND function for RANGE of cells
    By SHAYJOSH in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-22-2015, 06:17 PM
  4. [SOLVED] If function with range of cells
    By sanlen in forum Excel General
    Replies: 6
    Last Post: 10-13-2014, 11:37 PM
  5. Replies: 3
    Last Post: 10-25-2012, 05:47 PM
  6. Cells function within a range
    By therealjag in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-16-2009, 07:59 AM
  7. SUM function to be used for a range of cells
    By Ranjani in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-31-2009, 11:16 AM

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