Closed Thread
Results 1 to 4 of 4

Creating a new «spread» every time a dummy variable changes

  1. #1
    Registered User
    Join Date
    02-20-2021
    Location
    Bergen, Norway
    MS-Off Ver
    3.6.5
    Posts
    2

    Creating a new «spread» every time a dummy variable changes

    Hi

    I’m trying to create a new spread (In price) for each time «type» changes between 0 and 1. An example of this is C2 being subtracted by C3 (creating a value), and the next value being created by subtracting C3 with C4.

    There are instances where «type» 1 occurs several times in a row. Then i would like a spread to be created by each «1» and the latest «0».
    In the bigger dataset there are instances with several «0»’s in a row.

    I have manually calculated how I would like the spreads to be calculated in a sample workbook (Manual calculations of desired results).

    Hope i made myself clear! Any help would be appreciated
    Attached Files Attached Files

  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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,421

    Re: Creating a new «spread» every time a dummy variable changes

    Why have you created a new thread under a new ID instead of continuing in your original thread?

    No help to be offered until the OP has responded to my question, please.
    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
    Registered User
    Join Date
    02-20-2021
    Location
    Bergen, Norway
    MS-Off Ver
    3.6.5
    Posts
    2

    Re: Creating a new «spread» every time a dummy variable changes

    We are collaborating on this issue. We felt that that we didn't made ourselves clear with the first post, therefore we created a new thread where we tried to formulate our problem better.

  4. #4
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,421

    Re: Creating a new «spread» every time a dummy variable changes

    In that case, please be aware that collaborators may have only one thread per issue, just like the rest of the membership. This smacks as if you are trying to circumvent our rules: if so, please don't (and don't duplicate queries again).

    Please continue in the other thread. This thread is closed. You can bump, clarify and add information to the original thread.
    Last edited by AliGW; 02-20-2021 at 07:23 AM.

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. creating dummy data
    By joekat07 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-07-2017, 05:30 AM
  2. [SOLVED] Creating a Time elapsed Spread Sheet that records and posts time...
    By swade730 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-24-2013, 07:11 PM
  3. Using a Dummy Variable
    By chadnchady in forum Excel General
    Replies: 2
    Last Post: 10-01-2012, 09:22 AM
  4. Using Application.Match with a dummy Variable
    By rbateman in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-11-2012, 05:37 PM
  5. Dummy variable and multi regression
    By ledangthanhnam in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-21-2011, 08:16 AM
  6. Need help to generate a dummy variable
    By vme2 in forum Excel General
    Replies: 2
    Last Post: 11-21-2010, 04:16 AM
  7. Dummy variable and multiple regression
    By Excel_mastah in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-07-2009, 04:49 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