+ Reply to Thread
Results 1 to 4 of 4

If or

  1. #1
    Registered User
    Join Date
    11-10-2015
    Location
    Queensland, Australia
    MS-Off Ver
    2013
    Posts
    2

    Question If or

    Hi Gurus,
    I've got a table with some stock symbols and details in it.

    The formula i'm using to work out capital gains tax rates on it is as follows.

    =IF([@[Purchase date]] <=TODAY()-365, H14/2*0.38, H14*0.38)

    which works fine, so long as "H14" is a positive value, as this value is used in another column to work out profit after tax.

    can i use my formula, with another OR operator to return a zero if the result is negative? I have tried doing the following.

    =OR(IF([@[Purchase date]] <=TODAY()-365, H14/2*0.38, H14*0.38),IF(h14 <=0, 0, ...... but then i lose my way, i'm unsure how to get the original value if it returns false.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,917

    Re: If or

    Hi, welcome to the forum

    Maybe this?
    =if(H14<0,"",IF([@[Purchase date]] <=TODAY()-365, H14/2*0.38, H14*0.38))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    11-10-2015
    Location
    Queensland, Australia
    MS-Off Ver
    2013
    Posts
    2

    Re: If or

    Thanks for the welcome, and the quick response.

    I see how you have done that, and now its quite obvious! thanks a heap

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,917

    Re: If or

    Happy to help and thanks for the feedback

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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