+ Reply to Thread
Results 1 to 3 of 3

help with IF statement

Hybrid View

kevinu help with IF statement 03-15-2017, 07:48 PM
Phuocam Re: help with IF statement 03-15-2017, 08:37 PM
kevinu Re: help with IF statement 03-15-2017, 08:55 PM
  1. #1
    Forum Contributor
    Join Date
    03-10-2017
    Location
    USA
    MS-Off Ver
    office 2016
    Posts
    393

    help with IF statement

    Hi, Im trying to look at a row of numbers on a different sheet (b3;ae3)and if any of them are above 2 (or some other value i choose), then return the value from the first cell (a3). The numbers are sometimes in negative and positive.

    I tried:

    =IF(ABS('Max - Bins'!B3:AE3)>=1,'Max - Bins'!A3)

    I get a FALSE replay but it should be a true reply because there are numbers above 1. It does work when I make it >=.3 or less, which is weird and makes me think im messing up the ABS part of this because most of the numbers in the row are negative.

    Here are some of the values I'm looking at in be:ae3

    -0.229 -0.210 -0.466 -0.598 -0.778 -0.946 -0.994 -1.058 -0.972 -0.793 -0.749 0.619 -0.311

  2. #2
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2024
    Posts
    6,175

    Re: help with IF statement

    Try this ...

    =IF(OR(ABS('Max - Bins'!B3:AE3)>=1),'Max - Bins'!A3)

    Enter with C+S+E, or:

    =IF(OR(MAX('Max - Bins'!B3:AE3)>=1,MIN('Max - Bins'!B3:AE3)<=-1),'Max - Bins'!A3)

    Normal enter.

  3. #3
    Forum Contributor
    Join Date
    03-10-2017
    Location
    USA
    MS-Off Ver
    office 2016
    Posts
    393

    Re: help with IF statement

    The array worked great. If you can explain to me why did it need the or statement to work?

+ 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. [SOLVED] i have an if then statement that works, how to make it work as a with or case statement
    By dmcgov in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 06-03-2016, 03:34 PM
  2. [SOLVED] If statement to select data - nested statement - assistance
    By petitesouris in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-29-2015, 09:55 PM
  3. compile error expected line number statement end statement
    By mattress58 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-18-2014, 10:12 AM
  4. VBA Compile Error : line number or label or statement or end of statement
    By excellearner121 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-04-2013, 06:41 PM
  5. Replies: 4
    Last Post: 06-01-2012, 10:05 AM
  6. Replies: 4
    Last Post: 05-16-2012, 05:33 PM
  7. [SOLVED] Utilize a Select Case Statement in Target Intersect Statement
    By max57 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-29-2009, 08:55 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