+ Reply to Thread
Results 1 to 5 of 5

If function problem - Please help

  1. #1
    Registered User
    Join Date
    07-17-2015
    Location
    UK
    MS-Off Ver
    2007
    Posts
    2

    Post If function problem - Please help

    Hi, I created this if function for something im producing, for some reason its does not really work. Please help

    {=IF(G4:AK6="S","",IF(G4:AK6="H","",IF(G4:AK6="F","",IF(G4:AK6="","","ERROR"))))}

    It is searching a area for anything that is not the letter S, H or F (or a blank space). For some reason it only works if the invalid data is in cell G4 and only then do all of the if statments fail and the ERROR text is produced. Otherwise if invalid data is put anywhere else within that range notching happens.

    I don't really know what im doing and I feel im using If statments in the wrong way.

  2. #2
    Registered User
    Join Date
    06-05-2015
    Location
    Manchester, UK
    MS-Off Ver
    2016
    Posts
    94

    Re: If function problem - Please help

    A simple but less elegant solution would be to create a helper column with the following formula dragged down:

    =IF(OR(A1="G",A1="F",A1="S",A1=""),"","Error")

    And then replace your above formula with the following:

    =IF(COUNTIF(B:B,"Error")=0,"","ERROR")

  3. #3
    Registered User
    Join Date
    06-05-2015
    Location
    Manchester, UK
    MS-Off Ver
    2016
    Posts
    94

    Re: If function problem - Please help

    A better solution actually:

    =IF(COUNTIFS(A:A,"<>S",A:A,"<>",A:A,"<>F",A:A,"<>H")=0,"","Error")

    Just replace A:A with the range you are checking.

  4. #4
    Registered User
    Join Date
    07-17-2015
    Location
    UK
    MS-Off Ver
    2007
    Posts
    2

    Re: If function problem - Please help

    Amazing Thank you so much! Could you explain what it is doing?

  5. #5
    Registered User
    Join Date
    06-05-2015
    Location
    Manchester, UK
    MS-Off Ver
    2016
    Posts
    94

    Re: If function problem - Please help

    Of course. The <> means not equal to, so it's looking down the column and counting every cell that's not equal to S, F, H or blank. If the figure is 0, it does nothing, but if it's anything else it returns "Error".

+ 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: 6
    Last Post: 10-20-2013, 07:16 PM
  2. SUM Function Problem
    By darra Pharma in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-04-2013, 01:25 PM
  3. Problem Inserting Round function into an IF function
    By Ash87 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-11-2013, 05:37 PM
  4. IF function problem
    By d.i.y. man in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 04-20-2012, 08:57 AM
  5. if/and function problem
    By rphan in forum Excel General
    Replies: 1
    Last Post: 10-01-2011, 04:37 AM
  6. Function Problem
    By NCKMIZ83 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-01-2009, 08:15 PM
  7. Problem with Sum function
    By kumawat_s in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-17-2007, 05:18 PM
  8. Function problem
    By Sweeny in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-16-2005, 08:05 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