+ Reply to Thread
Results 1 to 10 of 10

Silly question cant get formula IF statement to work - can someone help

  1. #1
    Registered User
    Join Date
    06-24-2018
    Location
    London
    MS-Off Ver
    2016
    Posts
    4

    Silly question cant get formula IF statement to work - can someone help

    HI

    I have this formula for Demarks Pivot points

    =IF(B5>B2,((B3*2)+B4+B5),IF(B5<B3,((B3+(B4*2+B5))))) i also want to add IF IF(B5=B4,(B3+B4+(2*B5))) (which works independently) so when i do =IF(B5>B2,((B3*2)+B4+B5),IF(B5<B3,((B3+(B4*2+B5),IF(B5=B4,((B3+B4+(2*B5)))))) it comes up with an error which i cant fix...

    I am trying to use the for demarks pivot for trading to determine X

    If Close < Open: X = H + 2 x L + C
    If Close > Open: X = 2 x H + L + C
    If Close = Open: X = H + L + 2 x C
    New High = X / 2 - L
    New Low = X / 2 - H

    H =High L=Low C= Close
    with input points being

    Open 7,556.44
    High 7,689.44
    Low 7,556.20
    Close 7,682.27

    Hope you can help ! Ia m not the greatest at this ... Regards

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,415

    Re: Silly question cant get formula IF statement to work - can someone help

    Welcome to the forum!

    Your thread title is just about OK, but please try to avoid irrelevant things like "silly question" and "can someone help": this is a help forum, so yes, somebody will try to help. It would be much better if you included the error message you are receiving in the thread title.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,415

    Re: Silly question cant get formula IF statement to work - can someone help

    Will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one and nobody wants to have to recreate your data from scratch.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.

  4. #4
    Registered User
    Join Date
    06-24-2018
    Location
    London
    MS-Off Ver
    2016
    Posts
    4

    Re: Silly question cant get formula IF statement to work - can someone help

    ok apologies any idea of what the problem is ?

  5. #5
    Registered User
    Join Date
    06-24-2018
    Location
    London
    MS-Off Ver
    2016
    Posts
    4

    Re: cant get formula IF statement to work -

    HI

    I have included an attachment. What i need to to do is include the formula in B62 in B58 that's it. The value of B58 should not change. Thanks
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    06-24-2018
    Location
    UK
    MS-Off Ver
    2016
    Posts
    3

    Re: cant get formula IF statement to work -

    No idea if this has the outcome your expecting because I don't understand what this sheet is trying to do but I believe it should read:

    Please Login or Register  to view this content.

  7. #7
    Valued Forum Contributor jtakw's Avatar
    Join Date
    05-05-2018
    Location
    CA, USA
    MS-Off Ver
    2016
    Posts
    668

    Re: Silly question cant get formula IF statement to work - can someone help

    Hi,

    Does this do what you want?

    =IF(B5>B2,B3*2+B4+B5,IF(B5<B3,B3+B4*2+B5,IF(B5=B4,B3+B4+2*B5,"")))
    Last edited by jtakw; 06-24-2018 at 02:30 PM.

  8. #8
    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: Silly question cant get formula IF statement to work - can someone help

    Looks to like that is already IN the formula in B58?
    =IF(B5>B2,((B3*2)+B4+B5),IF(B5<B3,((B3+(B4*2+B5)*IF(B5=B4,(B3+B4+(2*B5)))))))
    =................................................................................IF(B5=B4,(B3+B4+(2*B5)))

    A slightly more streamlined version
    =B3+B4+IF(B5>B2,B3+B5,IF(B5<B3,B4+B5,IF(B5=B4,2*B5)))
    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

  9. #9
    Registered User
    Join Date
    06-24-2018
    Location
    London
    MS-Off Ver
    2016
    Posts
    4

    Re: Silly question cant get formula IF statement to work - can someone help

    HI Guys thank you all for replying! - Magic, in the end i took the streamlined version and works perfectly ( they all worked) Thank you all so much!!, I didn't think i was far off but was getting rather frustrating. Thank you once again !!! Regards Dom

  10. #10
    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: Silly question cant get formula IF statement to work - can someone help

    Happy to help

+ 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] Silly Question about variables
    By xlBunny in forum Excel - New Users/Basics
    Replies: 24
    Last Post: 04-23-2015, 11:25 AM
  2. Silly Excel Formula Question (having a brain freeze moment)
    By rjw524 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-05-2015, 02:46 PM
  3. [SOLVED] FILTERS: Probably a very silly question
    By EcoMike in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 11
    Last Post: 02-02-2013, 09:53 PM
  4. [SOLVED] Silly Question !!
    By DanielRay in forum The Water Cooler
    Replies: 4
    Last Post: 12-08-2012, 04:49 PM
  5. Silly Question !!
    By DanielRay in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-07-2012, 11:41 AM
  6. silly look up question
    By floricita in forum Excel General
    Replies: 1
    Last Post: 10-11-2010, 07:03 AM
  7. [SOLVED] Silly question about using dates
    By Zerosumgame in forum Excel General
    Replies: 5
    Last Post: 03-31-2006, 10:40 PM

Tags for this Thread

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