+ Reply to Thread
Results 1 to 4 of 4

IF statement help (has a range)

  1. #1
    Forum Contributor
    Join Date
    05-02-2017
    Location
    NoVa, United States
    MS-Off Ver
    Microsoft 365
    Posts
    154

    IF statement help (has a range)

    Okay, what I'm trying to do is to determine whether something is in the 'Hourly' range or 'Salary' range (or neither). The formula I have is:
    =IF(H4=A2:A61,"Hourly",IF(H4=D2:D61,"Salary","Neither"))

    Where am I going wrong here?
    Attached Files Attached Files

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: IF statement help (has a range)

    You can not use a range like that with an IF statement.

    Try this instead:

    =IF(COUNTIF(A2:A61,H4),"Hourly",IF(COUNTIF(D2:D61,H4),"Salary","Neither"))

  3. #3
    Forum Contributor
    Join Date
    05-02-2017
    Location
    NoVa, United States
    MS-Off Ver
    Microsoft 365
    Posts
    154

    Re: IF statement help (has a range)

    That totally works - thanks.

  4. #4
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: IF statement help (has a range)

    You're welcome. Happy to help.

    Thanks for the rep!

+ 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: 3
    Last Post: 11-05-2016, 06:23 AM
  2. [SOLVED] Add IF Statement formula to cells in varying range and paste to used range
    By Webbers in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-26-2015, 01:28 PM
  3. Replies: 1
    Last Post: 11-07-2014, 01:42 PM
  4. [SOLVED] Is it possible to have a range in an AND statement?
    By TexasKersh in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-27-2014, 05:23 AM
  5. [SOLVED] If then statement using range
    By zeroaxs in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-07-2013, 12:21 PM
  6. If statement with a range and true/false statement
    By aarleblanc in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-20-2012, 06:34 PM
  7. if statement with range
    By vancoservices in forum Excel General
    Replies: 4
    Last Post: 08-27-2010, 09:18 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