+ Reply to Thread
Results 1 to 11 of 11

Complex IF formula.

  1. #1
    Registered User
    Join Date
    03-14-2016
    Location
    Oslo
    MS-Off Ver
    2013 Student Package
    Posts
    47

    Complex IF formula.

    Hi everyone. Take a quick look at this from my first thread:

    Excel 2010
    A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
    2 54 43 29 35 40 56 53 65 71 75 45 28 35 51 60 71 72 52 49 48 29 25 28 35 51
    3 0 0 1 1 1 0 0 0 -1 -1 0 1 1 0 0 -1 -1 -1 0 0 1 1 1 1 0


    Worksheet Formulas
    Cell Formula
    B3 =IF(OR(AND(B2>=30,B2<50,A3=1),B2<=30),1,IF(OR(AND(B2>=70,B2<100),AND(B2>=50,A3=-1)),-1,0))
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------

    Problem

    Can you maybe help med to change this formula? It's the same rules and structure. However, I want the signals (-1,1,0) to be given the day after and not the same day as above.
    So with kind of a lag. (See excel sheet for example of how it should be. Here you also find the formula). I guess it should be possible to make a little change of the formula?

    So at the day it gives over/under 70/30 it should just be 0, and the signal should come the day after. Thanks!!! :D :D
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    03-14-2016
    Location
    Oslo
    MS-Off Ver
    2013 Student Package
    Posts
    47

    Re: Complex IF formula.

    Hi! Im sorry to bump this up again. I hope it's not that difficult? Please help. Thank you so much!
    Quote Originally Posted by Smasen91 View Post



    Worksheet Formulas
    Cell Formula
    B3 =IF(OR(AND(B2>=30,B2<50,A3=1),B2<=30),1,IF(OR(AND(B2>=70,B2<100),AND(B2>=50,A3=-1)),-1,0))
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------

    Problem

    Can you maybe help med to change this formula? It's the same rules and structure. However, I want the signals (-1,1,0) to be given the day after and not the same day as above.
    So with kind of a lag. (See excel sheet for example of how it should be. Here you also find the formula). I guess it should be possible to make a little change of the formula?

    So at the day it gives over/under 70/30 it should just be 0, and the signal should come the day after. Thanks!!! :D :D

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,767

    Re: Complex IF formula.

    As far as I am aware you can only place the results in the "Active cell" i.e, the one with the formula in , so unless the test can be changed to look retrospectively, you may have to resort to VBA.

  4. #4
    Registered User
    Join Date
    03-14-2016
    Location
    Oslo
    MS-Off Ver
    2013 Student Package
    Posts
    47

    Re: Complex IF formula.

    Hmm. I can't use VBA
    But what do you mean with look retrospectively?

    Maybe it's a way to "delete" every first -1, or 1 in a row... Hmm. That will also work.

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,767

    Re: Complex IF formula.

    BY retrospectively I mean value for Day n is determined by logic relating to Day n-1.

  6. #6
    Registered User
    Join Date
    03-14-2016
    Location
    Oslo
    MS-Off Ver
    2013 Student Package
    Posts
    47

    Re: Complex IF formula.

    I see. That's how it should be.
    Do you have an tip of how I can look at it that way? haha Thanks!

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,767

    Re: Complex IF formula.

    If I did I would have offered it!

  8. #8
    Registered User
    Join Date
    03-14-2016
    Location
    Oslo
    MS-Off Ver
    2013 Student Package
    Posts
    47

    Re: Complex IF formula.

    Im sorry. Of course.
    Im a little desp. Hmm.

    Im hoping it's maybe some other people who knows...

  9. #9
    Registered User
    Join Date
    03-14-2016
    Location
    Oslo
    MS-Off Ver
    2013 Student Package
    Posts
    47

    Re: Complex IF formula.

    Maybe if I make a new sheet... Where I use my ordinary one.. And said something like this:
    If A1 is zero or blank and A2 is 1 or -1, delete that 1, or -1.

    Do you follow my thought John? Because 1 or -1 will always begin after a zero or blank, and it is only the first one I need to delete.

  10. #10
    Valued Forum Contributor
    Join Date
    05-08-2015
    Location
    Uvalde, TX
    MS-Off Ver
    2010
    Posts
    720

    Re: Complex IF formula.

    As John suggested, make you formula retrospective. Change your formula to look at the cell to the left of the one it is currently looking at.
    Referencing your example. Have the formula in C4 look at B1. Copy your formula across. All the -1, 0, 1 line up they way you want the.

    Just a thought

  11. #11
    Registered User
    Join Date
    03-14-2016
    Location
    Oslo
    MS-Off Ver
    2013 Student Package
    Posts
    47

    Re: Complex IF formula.

    Of course! Thanks! :D

+ 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. too complex formula
    By Bab1 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-08-2014, 08:29 AM
  2. [SOLVED] Use an existing cell formula for creating a new more complex formula
    By dubcap01 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-23-2014, 07:41 AM
  3. complex AVG formula
    By koosh1986 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-22-2014, 06:46 PM
  4. Complex IF Formula
    By elanum in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-26-2013, 09:16 AM
  5. Need help with complex formula!
    By bcoluc1 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-20-2013, 02:07 AM
  6. Need Help with Complex??? Formula
    By sheppjr in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-12-2006, 12:34 PM
  7. Complex Formula
    By Saul in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-11-2006, 01:35 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