+ Reply to Thread
Results 1 to 4 of 4

If statement with multiple criteria

  1. #1
    Registered User
    Join Date
    03-05-2018
    Location
    UK
    MS-Off Ver
    365
    Posts
    4

    Post If statement with multiple criteria

    I am trying to write a formula to check 2 cells, which will have "Y" or "N" in them
    The logic is as follows:
    IF(Criteria A = TRUE), ((Price-Fees)-Postage)
    else
    IF(Criteria B = True), (Price-Fees)
    else
    IF(Criteria C = TRUE), ("")

    Criteria A
    Sold = "Y"
    Post = "Y"

    Criteria B
    Sold = "Y"
    Post = "N"

    Criteria C
    Sold = "N"
    Post = "N"

    I hope that makes sense!

  2. #2
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,176

    Re: If statement with multiple criteria

    usage: calcPostage( SOLD, POST,PRICE,FEE,POSTAGE)

    I assumed each was in a cell...
    =calcpostage(B2,C2,D2,E2, F2)



    Please Login or Register  to view this content.

  3. #3
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: If statement with multiple criteria

    Hello and welcome to the forum. Below is a formula solution.

    Assuming that the Sold value is in A2, the Post value is in B2, Price is in C2, Fees are in D2, and Postage is in E2, try this:

    =IF(A2&B2="YY",C2-D2-E2,IF(A2&B2="YN",C2-D2,IF(A2&B2="NN","","")))

  4. #4
    Registered User
    Join Date
    03-05-2018
    Location
    UK
    MS-Off Ver
    365
    Posts
    4

    Re: If statement with multiple criteria

    Thanks! The VB script works a treat!

+ 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. [SOLVED] If and statement for multiple criteria
    By sintek in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 01-04-2016, 12:46 PM
  2. [SOLVED] countifs statement with multiple criteria for multiple criteria ranges
    By mcdermott2 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-07-2015, 11:48 AM
  3. Count statement wtih multiple criteria only showing results for one criteria
    By uhlabomber in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-17-2013, 02:47 PM
  4. [SOLVED] If statement that will look among multiple criteria and generate a statement
    By liz5818 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-01-2013, 04:12 PM
  5. Multiple criteria within an IF statement
    By muish in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-29-2013, 06:00 PM
  6. Multiple criteria if statement
    By marlin5124 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-11-2011, 03:18 AM
  7. Help with Min If statement and multiple criteria
    By asdzc2000 in forum Excel General
    Replies: 1
    Last Post: 03-16-2011, 11:35 AM

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