+ Reply to Thread
Results 1 to 5 of 5

IF THEN Statements

Hybrid View

  1. #1
    Registered User
    Join Date
    05-15-2010
    Location
    Texas
    MS-Off Ver
    Excel 2000
    Posts
    20

    IF THEN Statements

    Hello,

    I have a data range C2:2001 in a worksheet titled "STATS" and within each cell in the range (C2:2001) is a value of "TRUE" which identfies an outlier and the word "FALSE" that does not identify an outlier.

    Problem:

    In another worksheet title "Data Entry" I cannot figure out a IF Then statement which works. In the worksheet titled "Data Entry" I need to be identified by the word "ERROR" if any cell in the worksheet "STATS" within the data range C2:2001 contains the word "TRUE".

    Seems not to difficult but just won't work.

    The cells starting in C2 contain the following formula: =ABS(B2)>3 if B2 is more than 3 standard deviations from the Mean, the cell (C2) will read "TRUE".

    All help is greatly appreciated.

    Thank You,

    Michael

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: IF THEN Statements

    The TRUE you're referring to is a Boolean rather than a text string so you should test based on =TRUE rather than ="TRUE", eg:

    =IF(STATS!C2=TRUE,"ERROR","")

    If all cells really do contain only TRUE/FALSE Booleans then technically the =TRUE isn't required given the value being tested is itself a Boolean, ie:

    =IF(STATS!C2,"ERROR","")

    would do the same.

  3. #3
    Registered User
    Join Date
    05-15-2010
    Location
    Texas
    MS-Off Ver
    Excel 2000
    Posts
    20

    Re: IF THEN Statements

    DonkeyOte

    Thanks for the quick reply. Your solution works for an individual cell, but I need to check a range of cells C2:C2001. The outlier may or may not reside in C2.

    The formula:
    =IF(Stats!C2:2001,"ERROR","")
    Does not pick up an outlier in cell C20.

    The formula:
    =IF(Stats!C20,"ERROR","")
    Works great but only for that particular cell. Do I have to enter the same formula 2,000 times for each individual cell?

    Any help is appreciated.

  4. #4
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: IF THEN Statements

    In DO's absence, what do you want to know?

    ERROR/blank in substitution for TRUE/FALSE for every cell seems somewhat arbitrary. You could use =countif(<range>,true) to count all 'true's.

    Perhaps post an example of what you're looking for?

    CC

    PS
    A specific answer to yoru question is 'no, you can copy and paste the formula once for as many cells as you please' - but this may sound facetious if that's not really the question you meant...
    Last edited by Cheeky Charlie; 05-15-2010 at 01:15 PM.

  5. #5
    Registered User
    Join Date
    05-15-2010
    Location
    Texas
    MS-Off Ver
    Excel 2000
    Posts
    20

    Re: IF THEN Statements

    Thanks for all your help. Problem solved, I appreciate your time.

    Michael.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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