+ Reply to Thread
Results 1 to 5 of 5

If Statement to calculate profit

  1. #1
    Registered User
    Join Date
    12-11-2013
    Location
    Asia
    MS-Off Ver
    Excel 2007
    Posts
    7

    If Statement to calculate profit

    Hi,

    I am calculating Gross Profit based on Hard Cost only. The conditions are:

    1) If there is value in Soft Cost + Hard Cost, Profit is calculated based on Hard Cost only.
    2) If there is value in Hard Cost only, Profit is calculated based on Hard Cost only.
    2) If there is value in Soft Cost only, Profit is not calculated (ie. Profit is zero)

    The formula I have is:

    IF(AND(B26="",C26>0),F26-C26,0)

    However, it does not work for scenario #1 above. What happens instead when there is a value for Soft Cost, the Profit is calculated as Zero.

    I've attached a Scenario file here.

    Would appreciate any help from this Forum.

    Thank you.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    12-24-2013
    Location
    China GuangZhou
    MS-Off Ver
    Excel 2003 &2007 & 2010
    Posts
    16

    Re: If Statement to calculate profit

    I guess:
    HTML Code: 

  3. #3
    Registered User
    Join Date
    12-24-2013
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2013
    Posts
    1

    Re: If Statement to calculate profit

    Hi,

    Try This: IF(AND(B2=0,C2>0),E2-C2,IF(AND(B2>0,C2>0),E2-C2,0))

  4. #4
    Registered User
    Join Date
    02-21-2012
    Location
    Shanghai, China
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: If Statement to calculate profit

    Is this what you are looking for?

    Please Login or Register  to view this content.
    Returns profit of 200 in scenario 1 & 2 with profit of 0 in scenario 3.

  5. #5
    Registered User
    Join Date
    12-11-2013
    Location
    Asia
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: If Statement to calculate profit

    Thank you both Abaglas and Picassov7. They both worked. Only difference is in formatting of the results--somewhow, Mr. Picasso, you formula returns a "0" in the cell instead of blank when I select "Accounting" as format. But not a big deal.

    Thank you again--appreciate it.

+ 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. Calculate Profit in Percentage & Currency
    By Lilly81 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-01-2012, 02:33 PM
  2. Formula to calculate profit
    By dandi10 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 05-10-2011, 09:47 AM
  3. How to calculate max profit per quarter ?
    By ElmerS in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 11-28-2008, 10:03 PM
  4. Auto Calculate Profit By Part #
    By Rockter in forum Excel General
    Replies: 11
    Last Post: 05-21-2007, 02:42 PM
  5. How do I calculate profit as a % of Sales price
    By bobnewmark in forum Excel General
    Replies: 3
    Last Post: 07-14-2006, 07:30 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