+ Reply to Thread
Results 1 to 6 of 6

Combining an IFS and IF(And function

  1. #1
    Registered User
    Join Date
    06-07-2021
    Location
    Surrey
    MS-Off Ver
    365
    Posts
    5

    Combining an IFS and IF(And function

    Hi,

    Could someone please give me some advice about writing a formula that combines the following (included in cells E2 and E3 of the attached example):

    =IFS(D2=0,C2,D2<>0,D2)
    =IF(AND(B3="Active",D3=0),D3,C3)

    I'd like to insert one formula to copy down in column E.

    Many thanks in advance.

    Richard
    Attached Files Attached Files

  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,687

    Re: Combining an IFS and IF(And function

    I do not have 365 but try

    =IFS(D2=0,C2,D2<>0,D2,AND(B3="Active",D3=0),D3,TRUE,C3)

  3. #3
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    6,258

    Re: Combining an IFS and IF(And function

    Try

    =IF(D2=0,IF(A2="Active",0,C2),D2)
    Bernie Deitrick
    Excel MVP 2000-2010

  4. #4
    Registered User
    Join Date
    06-07-2021
    Location
    Surrey
    MS-Off Ver
    365
    Posts
    5

    Re: Combining an IFS and IF(And function

    Thanks for your replies. Unfortunately neither suggestion returns the result I was expecting in F3. =IF(AND(B3="Active",D3=0),D3,C3) returns a zero in my test, whereas your kind suggestions give a 3. Maybe there's a better function or data structure to use.

  5. #5
    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,687

    Re: Combining an IFS and IF(And function

    This ??

    =IF(AND(B2="Active",D2=0),D2,IF(D2=0,C2,D2))

  6. #6
    Registered User
    Join Date
    06-07-2021
    Location
    Surrey
    MS-Off Ver
    365
    Posts
    5

    Re: Combining an IFS and IF(And function

    Thanks very much John. That's done the trick .
    Have a great day.
    Richard

+ 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. Combining an IF function and WORKDAY function
    By rider2 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-14-2017, 10:32 PM
  2. Formula Structure Error When Combining IF Function with VLOOKUP Function
    By EverClever in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-16-2017, 03:11 PM
  3. Combining a SUM function and a VLOOKUP Function
    By mrmcmillanrevis in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-19-2015, 04:52 PM
  4. Combining a IF function and lookup function
    By Trottlips in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-08-2014, 05:34 PM
  5. [SOLVED] Combining Text Function with Indirect Function
    By ninmjj in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-31-2013, 10:34 AM
  6. combining an IF function with an INDEX array function?
    By Chris.eagle99 in forum Excel General
    Replies: 1
    Last Post: 03-01-2012, 04:43 AM
  7. combining --mid function with ifiserror function
    By kadi in forum Excel General
    Replies: 5
    Last Post: 06-27-2011, 04:40 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