+ Reply to Thread
Results 1 to 7 of 7

Using IF, AND + OR Functions

  1. #1
    Registered User
    Join Date
    03-26-2024
    Location
    Reading, England
    MS-Off Ver
    2402
    Posts
    4

    Question Using IF, AND + OR Functions

    Hi,

    I was hoping someone would be able to help me to use the IF function but also to incorporate both AND and OR for multiple different options within the formula.

    The data I am using is (hopefully) attached, and I want to automate the output to a cell both based on size (kW) and flow temperature (C). The selection will only be one size and one temperature, but the output varies depending on both. I think I have got my head around using IF with AND as I managed to get it to function with just one line, but having multiple is blowing my mind a bit. I've somewhat out something together below but any help would be greatly appreciated!

    IF(AND(D3=16,D8=35),14.04)
    (AND(D3=16,D8=40),13.66)
    (AND(D3=16,D8=45),13.29)
    (AND(D3=16,D8=50),12.38)
    (AND(D3=12,D8=35),11.52)
    (AND(D3=12,D8=40),11.25)
    (AND(D3=12,D8=45),10.96)
    (AND(D3=12,D8=50),10.42)
    (AND(D3=8,D8=35),7.21)
    (AND(D3=8,D8=40),6.98)
    (AND(D3=8,D8=45),6.75)
    (AND(D3=8,D8=50),6.36)
    Attached Images Attached Images

  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
    28,209

    Re: Using IF, AND + OR Functions

    Create a table like (or similar to) the one shown in the image and then use INDEX/MATCH.

    Fast answers need clear examples. See yellow banner at top of the page on how to attached a workbook.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Registered User
    Join Date
    03-26-2024
    Location
    Reading, England
    MS-Off Ver
    2402
    Posts
    4

    Re: Using IF, AND + OR Functions

    Hopefully added example workbook now?!
    Attached Files Attached Files

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,732

    Re: Using IF, AND + OR Functions

    You could use the following formula in cell D9:

    =IFERROR(INDEX($M$4:$P$12,MATCH(D3&"kW",$L$4:$L$12,0),MATCH(D8&"°C",$M$3:$P$3,0)),"no match")

    However, this will only return data from the top 4 rows of the table, where appropriate, as it would not match with the lower rows.

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    03-26-2024
    Location
    Reading, England
    MS-Off Ver
    2402
    Posts
    4

    Re: Using IF, AND + OR Functions

    Ive Managed to make it work however the results are spilling into adjacent cells?! index attempt.xlsx

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,055

    Re: Using IF, AND + OR Functions

    Try:

    =INDEX(C23:F41, MATCH(C2,B23:B41,0), MATCH(C7,C22:F22,0))
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  7. #7
    Registered User
    Join Date
    03-26-2024
    Location
    Reading, England
    MS-Off Ver
    2402
    Posts
    4

    Re: Using IF, AND + OR Functions

    Perfect! Thanks a lot!

+ 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: 7
    Last Post: 08-18-2017, 11:53 AM
  2. Replies: 9
    Last Post: 06-13-2017, 01:41 PM
  3. Replies: 6
    Last Post: 03-17-2015, 01:35 AM
  4. Replies: 1
    Last Post: 02-10-2012, 05:27 PM
  5. Replies: 0
    Last Post: 11-15-2007, 05:24 AM
  6. [SOLVED] efficiency: database functions vs. math functions vs. array formula
    By nickname in forum Excel General
    Replies: 2
    Last Post: 07-13-2006, 11:30 PM
  7. Replies: 0
    Last Post: 06-05-2006, 05:20 AM

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