Results 1 to 4 of 4

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

Threaded View

  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

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