+ Reply to Thread
Results 1 to 9 of 9

Using If with and & or together

Hybrid View

PATANN Using If with and & or... 11-02-2016, 11:34 AM
JohnTopley Re: Using If with and & or... 11-02-2016, 11:49 AM
PATANN Re: Using If with and & or... 11-02-2016, 11:57 AM
Tony Valko Re: Using If with and & or... 11-02-2016, 01:08 PM
PATANN Re: Using If with and & or... 11-02-2016, 01:34 PM
Tony Valko Re: Using If with and & or... 11-02-2016, 01:37 PM
Tony Valko Re: Using If with and & or... 11-02-2016, 11:50 AM
PATANN Re: Using If with and & or... 11-02-2016, 11:57 AM
JohnTopley Re: Using If with and & or... 11-02-2016, 12:55 PM
  1. #1
    Registered User
    Join Date
    11-02-2016
    Location
    Petersburg, VA
    MS-Off Ver
    2010
    Posts
    4

    Using If with and & or together

    I have created a spreadsheet for the end users to use that allows them to select from a list the deposit type now I need the bank code to automatically be entered based on the deposit type and there are 3 types of deposits. I have the first have correct but I'm not sure how to add next half.

    =IF(AND(E3="Credit Card"), (A1="Prince George Health Department"),"1103-Wells Fargo Credit Card") or
    =IF(AND(E3="Cash & Check"), (A1="Prince George Health Department"),"5200-BSV") or
    =IF(AND(E3="Electronic Wire"), (A1="Prince George Health Department"),"1106-Electronic Funds")

    Please help, I say a message suggesting using INDEX & MATCH it wasn't clear enough.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,769

    Re: Using If with and & or together

    Try

    =IF(AND(E3="Credit Card",A1="Prince George Health Department"),"1103-Wells Fargo Credit Card",IF(AND(E3="Cash & Check",A1="Prince George Health Department"),"5200-BSV",IF(AND(E3="Electronic Wire", A1="Prince George Health Department"),"1106-Electronic Funds","")))

  3. #3
    Registered User
    Join Date
    11-02-2016
    Location
    Petersburg, VA
    MS-Off Ver
    2010
    Posts
    4

    Re: Using If with and & or together

    Thanks but the formula didn't return any information, it may be because I didn't provide the destination for the bank code which is b5

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Using If with and & or together

    If A1 DOES NOT contain Prince George Health Department then the formula will return a blank "".

    If A1 DOES contain Prince George Health Department AND E3 DOES NOT contain one those specific criteria then the formula will return a blank "".
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Registered User
    Join Date
    11-02-2016
    Location
    Petersburg, VA
    MS-Off Ver
    2010
    Posts
    4

    Re: Using If with and & or together

    the formula is in b5 and both fields contain Prince George or the deposit type. Will it matter if e3 has a list they will select.

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Using If with and & or together

    Quote Originally Posted by PATANN View Post
    Will it matter if e3 has a list they will select.
    No

    I suggest you post a small sample file so we can see what's happening.

    We don't need the entire file. Just what's in A1, B5 and E3.

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Using If with and & or together

    Like this...

    =IF(A1="Prince George Health Department",IF(E3="Credit Card","1103-Wells Fargo Credit Card",IF(E3="Cash & Check","5200-BSV",IF(E3="Electronic Wire","1106-Electronic Funds",""))),"")

  8. #8
    Registered User
    Join Date
    11-02-2016
    Location
    Petersburg, VA
    MS-Off Ver
    2010
    Posts
    4

    Re: Using If with and & or together

    Thanks but the formula didn't return any information, it may be because I didn't provide the destination for the bank code which is b5.

  9. #9
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,769

    Re: Using If with and & or together

    Formula should be in B5 if that's where you want the result.

+ 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