+ Reply to Thread
Results 1 to 5 of 5

IF(AND ....) get invalid message

  1. #1
    Registered User
    Join Date
    11-24-2014
    Location
    Oslo
    MS-Off Ver
    Excel 2010
    Posts
    10

    IF(AND ....) get invalid message

    HI,

    I am trying to use and IF function with AND however when i hit enter i always get the message that the formula contains an error. Trouble is, even after investigating for a while i cant see what i am doing wrong.

    I have values that currently have duplicate values for 3 columns, that being the case i want to add a value to a currently blank column.
    The suggested formula that I am trying to apply is as follows-

    =IF(AND(B3=B2,C3=C2,M3=M2),N2+1,1)

    This would be applied in cell N3.
    So when comparing rows 2 and 3, if the values for column B,C and M all match then a value in N should be created to distinguish rows 2 and 3. So if N2=1 and B,C and M all matched then N3 would be then 2.

    However, i always get the error message. From the searches Ive done this syntax seems to match other searches that have been done, so I really dont know what i am doing wrong here. Any help would be appreciated.

    cheers,
    Nomad1

  2. #2
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: IF(AND ....) get invalid message

    That works for me!!
    Can you post a sample workbook where you are getting this error.
    Happy to Help

    How to upload excel workbooks at this forum - http://www.excelforum.com/the-water-...his-forum.html

    "I don't get things easily, so please be precise and elaborate"

    If someone's post has helped you, thank by clicking on "Add Reputation" below the post.
    If your query is resolved please mark the thread as "Solved" from the "Thread Tools" above.

    Sourabh

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: IF(AND ....) get invalid message

    It's probably your regional settings.
    Try changing the commas to semicolons ( , to ; )

  4. #4
    Registered User
    Join Date
    11-24-2014
    Location
    Oslo
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: IF(AND ....) get invalid message

    I was just about to attach a sample workbook, then I read the post about commas vs semi colons.
    That turned out to be the solution! I am in Norway so I presume the regional settings had something to do with it.

    thanks for the replies, appreciate it.

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: IF(AND ....) get invalid message

    You're welcome.

+ 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: 1
    Last Post: 06-04-2015, 05:22 PM
  2. Dynamic Chart - Invalid reference error message
    By Anthony2 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 03-12-2014, 04:00 AM
  3. Message for invalid entry
    By LilyLove in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 04-26-2013, 08:42 AM
  4. Replies: 0
    Last Post: 03-10-2013, 11:17 PM
  5. Create an error message when retrieving information for invalid dates
    By Habanero Time in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-12-2012, 11:56 PM
  6. Invalid Property Value Message
    By lucasreece in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-13-2009, 01:03 PM
  7. Clear Form results in INCORRECT "Invalid Property" message....
    By B in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-20-2006, 01:30 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