+ Reply to Thread
Results 1 to 5 of 5

Excel Nested IF formula help needed

  1. #1
    Registered User
    Join Date
    04-26-2014
    Location
    singapore
    MS-Off Ver
    Excel 2016
    Posts
    15

    Excel Nested IF formula help needed

    Hello,

    I am having some difficulties with the multiple Excel IF formula that contains a number of criteria. Basically, the formula is required to place different text values based on various conditions that I have defined.

    Enclosed is a small sample file. The formula that needs to be created should be in column J but because I keep encountering error messages I have entered manually the expected values based on the criterion. Below is the business logic.

    Column H Excel formula ( cell H5 as example )
    IF Interim signal = SELL then set value = Exit Alert

    Either (i) IF High Price > Target Selling Price then set value = SELL
    OR (ii) IF Low Price < Base Price then set value = SELL

    IF last value ( cell H4 ) = Exit Alert then
    IF Open Price > Target Selling Price then set value = SELL
    IF Interim Signal = BUY then set value = BUY
    IF last value ( cell H4 ) = BUY then set value = Hold
    Else
    set value = Hold

    Thank you for your help !

    engine44
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    04-26-2014
    Location
    singapore
    MS-Off Ver
    Excel 2016
    Posts
    15

    Re: Excel Nested IF formula help needed

    Sorry for the typing error. It should be column J. ( instead of H )

    Column J Excel formula ( cell J5 as example )
    IF Interim signal = SELL then set value = Exit Alert

    Either (i) IF High Price > Target Selling Price then set value = SELL
    OR (ii) IF Low Price < Base Price then set value = SELL

    IF last value ( cell J4 ) = Exit Alert then
    IF Open Price > Target Selling Price then set value = SELL
    IF Interim Signal = BUY then set value = BUY

    IF last value ( cell J4 ) = BUY then set value = Hold

    Else
    set value = Hold

  3. #3
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Excel Nested IF formula help needed

    Hello
    try this one
    J1 =IF(I2="SELL","EXIT ALERT",IF(I2="Buy","Buy",IF(J1="Exit Alert",IF(B2>G2,"Sell","Exit Pending"),IF(J1="Buy","Hold",IF(OR(C2>G2,D2<H2),"SELL","Hold")))))
    However it doesn't seems to match some results of "Hold", as you told that if High Price > Target Selling Price then set value = SELL so it returns "Sell" but as per your example the results are "Hold"
    Can you explain which criteria I am probably missing??
    Regards
    Happy to Help

    How to upload excel workbooks at this forum - http://www.excelforum.com/the-water-...his-forum.html

    "I don't get things easily, so please be precise and elaborate"

    If someone's post has helped you, thank by clicking on "Add Reputation" below the post.
    If your query is resolved please mark the thread as "Solved" from the "Thread Tools" above.

    Sourabh

  4. #4
    Registered User
    Join Date
    04-26-2014
    Location
    singapore
    MS-Off Ver
    Excel 2016
    Posts
    15

    Re: Excel Nested IF formula help needed

    Hello sourabhg98,

    I have missed out 2 other conditions which have now been added to your formula above. The complete nested IF formula should be :

    =IF(I2="SELL","EXIT ALERT",IF(I2="Buy","BUY",IF(J1="Exit Alert",IF(B2>G2,"Sell","Exit Pending"),IF(J1="Buy","Hold",IF(J1="SELL","Hold",IF(J1="Hold","Hold",IF(OR(C2>G2,D2<H2),"SELL","Hold")))))))

    Re-attached the updated file.

    Thank you ! this is a big help.

    regards
    engine44
    Attached Files Attached Files

  5. #5
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Excel Nested IF formula help needed

    Glad to know it worked!!
    Cheers!

+ 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. Help with Nested IF Formula Needed
    By financeanalyst in forum Excel General
    Replies: 4
    Last Post: 04-03-2014, 10:18 AM
  2. [SOLVED] Nested IF or IF(AND formula needed please
    By rwalker1052 in forum Excel General
    Replies: 3
    Last Post: 11-26-2013, 03:58 AM
  3. Nested If Formula Help Needed
    By johnsor1 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-26-2012, 09:34 AM
  4. Nested IF or LOOKUP Formula needed?
    By shudder in forum Excel General
    Replies: 6
    Last Post: 09-14-2009, 11:12 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