+ Reply to Thread
Results 1 to 17 of 17

IF And statement not working

  1. #1
    Registered User
    Join Date
    01-14-2015
    Location
    Florida, United States
    MS-Off Ver
    365
    Posts
    53

    IF And statement not working

    I have a IF(And statement which is not returning the results. It's giving me n/a on column D. I want it to look at column A and column AA and return column W in column D. Any help would be appreciated.
    Attached Files Attached Files

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: IF And statement not working

    Could you give us a few expected results?

    BSB

  3. #3
    Registered User
    Join Date
    01-14-2015
    Location
    Florida, United States
    MS-Off Ver
    365
    Posts
    53

    Re: IF And statement not working

    yes, Column D should return the Durbin pavillion Paint from Column W.

  4. #4
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: IF And statement not working

    Does this in D2 and copied down help?
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    BSB

  5. #5
    Registered User
    Join Date
    01-14-2015
    Location
    Florida, United States
    MS-Off Ver
    365
    Posts
    53

    Re: IF And statement not working

    Still gives me n/a

  6. #6
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: IF And statement not working

    Are your dates in column A definitely in date format?
    When I open the file they're text rather than dates.

    If you expand the width of column A are the dates to the left or right?

    BSB

  7. #7
    Registered User
    Join Date
    01-14-2015
    Location
    Florida, United States
    MS-Off Ver
    365
    Posts
    53

    Re: IF And statement not working

    They are dates, I even just reformatted all of them. They dates are to the left and so are the ones in column V.

  8. #8
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: IF And statement not working

    Can you highlight all of column A then select "Data / Text to Columns / Finish" and see if that changes the results in D?

    BSB

  9. #9
    Registered User
    Join Date
    01-14-2015
    Location
    Florida, United States
    MS-Off Ver
    365
    Posts
    53

    Re: IF And statement not working

    It didn't work

  10. #10
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: IF And statement not working

    OK, then I'm unable to help further. I'm in the UK and your data shows up on my regional settings differently to how it does on yours.

    You'll need someone with different regional settings to mine to check if for you I'm afraid.


    BSB

  11. #11
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: IF And statement not working

    I agree with BSB in that col A is text not dates.
    If you select col A & format as general you should see numbers like 43423. If you don't then they are not dates.
    Use text to columns > delimited > clear all check marks > select date & MDY> Finish.

  12. #12
    Valued Forum Contributor
    Join Date
    05-11-2013
    Location
    Wales
    MS-Off Ver
    Excel 2010
    Posts
    586

    Re: IF And statement not working

    Hi "T",

    If you change the date format in column A to the same as column V your formula works.

    Regards

    peterrc

  13. #13
    Registered User
    Join Date
    01-14-2015
    Location
    Florida, United States
    MS-Off Ver
    365
    Posts
    53

    Re: IF And statement not working

    It is only working on the first 2 lines but not the rest of them. I reuploaded the file.
    Attached Files Attached Files

  14. #14
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,908

    Re: IF And statement not working

    That wasn't the suggested formula, which was:
    =IF(AND($V2>=A2, $AA2=B2), $W2,"n/a")

    Note: you only refer to one row, not multiple.
    Rory

  15. #15
    Registered User
    Join Date
    01-14-2015
    Location
    Florida, United States
    MS-Off Ver
    365
    Posts
    53

    Re: IF And statement not working

    I need it for all the rows with the crew names in it. I used that formula and expanded it.

  16. #16
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,908

    Re: IF And statement not working

    That won't work. If the formula needs to do more than just look at A and AA in the same row, you'll need some sort of lookup formula. Something like:

    =IFERROR(LOOKUP(2,1/(A2=$V$2:$V$59)/(B2=$AA$2:$AA$59),$W$2:$W$59),"No match")

  17. #17
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: IF And statement not working

    Is this what you want
    =INDEX($W$2:$W$59,MATCH(1,($V$2:$V$59=A2)*($AA$2:$AA$59=B2),0))
    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

+ 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. multiple if statement not working but not working (make sense!)
    By vanessafvg in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-17-2018, 12:06 AM
  2. SUM IF statement not working
    By Aly1978 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-19-2017, 11:52 PM
  3. [SOLVED] IF statement not working.
    By OwlChutney in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-08-2014, 01:51 PM
  4. [SOLVED] Using = and <> in IF(AND statement not working
    By bocrad75 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-15-2014, 12:39 PM
  5. Working While Statement Stops Working
    By Verbaruab in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-10-2011, 05:58 PM
  6. If Then Statement - Still Not Working
    By SEOT in forum Excel Programming / VBA / Macros
    Replies: 51
    Last Post: 01-15-2009, 08:53 PM
  7. If statement not working
    By excelnut1954 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-15-2005, 06:40 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