+ Reply to Thread
Results 1 to 4 of 4

Want to break a year range.

  1. #1
    Registered User
    Join Date
    06-13-2016
    Location
    Bangladesh
    MS-Off Ver
    2007
    Posts
    2

    Want to break a year range.

    Hello every one, i was wondering if i can break a year range for every single year.
    I do have one question, maybe its something you could help with. I have an excel sheet with a YEAR range.

    Example:

    ACURA TL Black NIGHTHAWK BLACK B92P-3 2000 - 2004

    Would it be possible to exand it so each year has a row in the CSV. So it would look like.....

    ACURA TL Black NIGHTHAWK BLACK B92P-3 2000
    ACURA TL Black NIGHTHAWK BLACK B92P-3 2001
    ACURA TL Black NIGHTHAWK BLACK B92P-3 2002
    ACURA TL Black NIGHTHAWK BLACK B92P-3 2003
    ACURA TL Black NIGHTHAWK BLACK B92P-3 2004

    I have attached a screenshot too.
    Thanks in advanced.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Want to break a year range.

    Hi khisaprojjal,

    Welcome to the Forum!

    Can you:Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window (or use the paperclip icon).
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    06-13-2016
    Location
    Bangladesh
    MS-Off Ver
    2007
    Posts
    2

    Re: Want to break a year range.

    Sure. I have attached two file named as "before" and "after". At the file named "Before" has a column named "Release Year" that shows a year range of 1978-1982. So i want to break that range to 1978, 1979, 1980, 1981, 1982. The result should be like the one i have provided at the "After" excel sheet.
    Thanks in advanced.
    Attached Files Attached Files

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Want to break a year range.

    Try this:

    Please Login or Register  to view this content.
    If you haven't used macros before you'll need to go to:
    File- options - trust center -trust center settings - macro settings ,
    the second option down (disable all macros with notification)

    Then - Copy the code to the clipboard

    Open your Workbook

    Press ALT + F11 to open the Visual Basic Editor.

    Select "Module" from the Insert menu

    Type "Option Explicit" then paste the code under it

    With the cursor between Sub and End Sub press F5 (F8 to Single Step)

    OR

    Press ALT + Q to close the code window.

    Press ALT + F8 then double click on the macro name
    *Be sure to save the book with the code as Macro-Enabled

+ 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. auto page break around cell range so as not to print a range across 2 pages
    By lonemascot in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 02-08-2016, 04:48 PM
  2. Replies: 3
    Last Post: 10-06-2015, 05:30 PM
  3. Replies: 0
    Last Post: 11-23-2012, 01:27 AM
  4. Break down by year
    By Dermot McGrath in forum Excel General
    Replies: 7
    Last Post: 10-29-2012, 01:05 PM
  5. [SOLVED] Count days for specific year falling within in multi-year date range
    By jslo2013 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-04-2012, 05:58 PM
  6. Break Even Point - return the year
    By smithhadl in forum Excel General
    Replies: 2
    Last Post: 05-02-2012, 04:48 PM
  7. Replies: 3
    Last Post: 03-12-2009, 09:54 AM

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