Closed Thread
Results 1 to 4 of 4

Using Array Formula to Code Gaps in Years

  1. #1
    Registered User
    Join Date
    11-02-2018
    Location
    Lisbon, PT
    MS-Off Ver
    2013
    Posts
    8

    Using Array Formula to Code Gaps in Years

    I'm trying to create a dummy variable list for sanctions events that have taken place over the past 60 years.

    Please just look at the "Excel Forum" tab in the attached document since it is simplified.

    Hypothetical Example:

    Sanctions event:
    1962 - 1965 | Argentina| 1 ("1" Signifies a sanction took place)

    I would like this coded into:

    Panel Data
    1960 | Argentina | 0
    1961 | Argentina | 0
    1962 | Argentina | 1
    1963 | Argentina | 1
    1964 | Argentina | 1
    1965 | Argentina | 1
    1966 | Argentina | 0
    1967 | Argentina | 0

    You will already see in the attached excel document that I've already created an array formula to measure the start year. I just do not know how I can measure the end year and the years in-between.

    The document has a highlighted example and comments to explain the situation event more.

    Thank you for your help!
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: Using Array Formula to Code Gaps in Years

    How does this differ from what you are asking in your other thread, 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
    11-02-2018
    Location
    Lisbon, PT
    MS-Off Ver
    2013
    Posts
    8

    Re: Using Array Formula to Code Gaps in Years

    It is similar, but I needed more specificity with solving a problem that shows both beginning years, middle years, and end years.

  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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: Using Array Formula to Code Gaps in Years

    OK - I am closing this thread. It is not different enough to warrant a new thread - please post your 'upgraded' request in the original thread, where you have already had significant input. Thanks.

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Need Code for Filling gaps in Cells
    By pvsvprasad in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-17-2016, 04:30 AM
  2. [SOLVED] Excel formula years service between years
    By vba1234 in forum Excel Formulas & Functions
    Replies: 21
    Last Post: 11-25-2015, 04:19 PM
  3. How do I get gaps in a chart with values from an array using VBA?
    By annabroyn in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-06-2014, 10:18 AM
  4. [SOLVED] Age based on DOB; Accounts for leap years. Years old if >2, Months if <2 years old.
    By sharpmel in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-17-2013, 04:20 PM
  5. [SOLVED] Array Formula vs vBa code - How To Modify My Messy Code To One Of Those
    By ScotyB in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-20-2012, 12:04 AM
  6. [SOLVED] Charting Date Gaps as Gaps
    By reactant in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 07-10-2012, 12:42 PM
  7. [SOLVED] Transpose Column With Gaps to Row With No Gaps?
    By SteveC in forum Excel General
    Replies: 5
    Last Post: 06-17-2005, 08:05 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