+ Reply to Thread
Results 1 to 8 of 8

If statements in excel 2007

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

    Question If statements in excel 2007

    Hi,

    Here is my condition:

    IF B27<>0, F27=B27
    IF C27<>0, F27= C27/(1-D)
    IF B27<>0 AND C27<>0, F27 = B26 + C27/(1-D)


    I have the below formula:
    =IF(AND(B27<>0,C27<>0),C27/(1-D27)+B27)

    But this only calculates if BOTH B27 and C27 have values. But if only one or the other has values, it returns as "False".

    Would appreciate any help from this group.

    Thanks,

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: If statements in excel 2007

    Please describe in words about what you are trying to do


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: If statements in excel 2007

    welcome to the forum, RosaMarie. maybe:
    =IF(AND(B27<>0,C27<>0),B26+C27/(1-0.5),IF(B27<>0,B27,IF(C27<>0,C27/(1-0.5),"")))

    replace the 0.5 in red because i don't know what D refers to when you say:
    IF B27<>0 AND C27<>0, F27 = B26 + C27/(1-D)

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

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

    Re: If statements in excel 2007

    Thank you Mr. benishiryo! It worked perfectly.

    For sixthsense:

    What I was trying to do was calculate the Selling Price (F27) based on Soft Cost (B27) and/or Hard Cost (D27). There will be occasions whereby I will only have values for Soft Cost, and sometimes only for Hard Cost, and sometimes for both. Thus:

    IF B27<>0, F27=B27
    IF C27<>0, F27= C27/(1-D)
    IF B27<>0 AND C27<>0, F27 = B26 + C27/(1-D)

    After calculating Selling Price, I then need to calculate my Profit on Hard Cost only (G27), which I have the formula as: (F27-C27)-B27. {This works, but would accept advice from this forum if I'm doing it wrong}

    Hope this post will be helpful to others as well.

    Cheers!

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

    Re: If statements in excel 2007

    Thanks for the reminder, Vlady. If I may say, however--a little harsh on your tone

    Anyways, actually it doesn't look like my formula to calculating the Profit based on Hard Cost is not working:

    IF(AND(ISBLANK(B27)=TRUE, C27>0), F27-C27), IF(ISBLANK(B27)=FALSE), G27, “ “))

    The conditions are:
    IF B27>0 and C27=0, then G27 = 0
    IF B27=0 and C27=0, then G27 = 0
    IF B27=0 and C27>0, then G27 = F27-C27

    So, if there is a value on B27 (Soft Cost) but nothing on C27 (Hard Cost), there shouldn't be no value on the G27 (Profit on Hard Cost). Alternatively, if there is no vale on B27 but there is value in C27, G27 should only be based on the value from Selling Price (F27) minus the Hard Cost. If there are no values on both Soft Cost and Hard Cost, there should not be values on Profit on Hard Cost.

    Any help would be appreciated.

    Thanks.

  6. #6
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: If statements in excel 2007

    Umarking as "Solved". Due to post #6

    a little harsh on your tone
    those are canned replies
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  7. #7
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: If statements in excel 2007

    Quote Originally Posted by RosaMarie View Post
    If I may say, however--a little harsh on your tone
    could you tell us which part of it sounds harsh to you? i read it several times & couldn't find any parts. if you really feel so, i assure you vlady didn't mean to.

    anyway, as i replied your PM, a new question should be in a new thread. but i'll help you this time round. you stated:
    IF B27>0 and C27=0, then G27 = 0
    IF B27=0 and C27=0, then G27 = 0
    IF B27=0 and C27>0, then G27 = F27-C27

    so maybe:
    =IF(AND(ISBLANK(B27),C27>0),F27-C27,0)
    or:
    =IF(AND(B27="",C27>0),F27-C27,0)

    for future questions, you could upload a sample excel file giving us real numbers to work with. you have 3 scenarios, so do at least 3 of them & show us the answers you are hoping to get. it helps us visualize better:
    Data Range
    B
    C
    D
    E
    F
    G
    26
    Soft Cost
    Hard Cost
    SP
    Profit on Hard Cost
    27
    3
    10
    0
    28
    2
    10
    8
    29
    0

  8. #8
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: If statements in excel 2007

    @ Ben i think my signature rather not the canned replies.

+ 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: 24
    Last Post: 08-24-2016, 05:10 AM
  2. Replies: 4
    Last Post: 11-05-2012, 07:15 AM
  3. [SOLVED] Excel 2007 : Month/Year Format with Pivot Table - Excel 2007
    By db1966 in forum Excel General
    Replies: 3
    Last Post: 05-17-2012, 04:35 AM
  4. Nested IF statements with Text as IF and THEN (Excel 2007)
    By mrsbigglesworth in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-13-2010, 09:02 AM
  5. Nested IF statements with Text as IF and THEN (Excel 2007)
    By mrsbigglesworth in forum Excel General
    Replies: 2
    Last Post: 12-13-2010, 01:48 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