Mr Excel & excelisfun Trick 57: Extract Many Years from Just Two Years

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
1,822
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Nov 24, 2010

See Mr Excel and excelisfun take the text string "1997-2000" and create a row of years consisting of 1997, 1998, 1999, 2000. See the functions LEFT, RIGHT, COLUMNS and IF functions. VBA or Formula. Learn about the difference between numbers and text for Logical Formulas.

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (ExcelIsFun)

  • Thanks for giving simple way to extract dates.

  • You are welcome!

  • I like VBA Macro,No much calculation of Formulas no more data added into Excel file.. simply just run the macro and complete My Work..

    In Function My Answer is this

    =IF(COLUMNS($B$1:B1)<=(RIGHT($­A1,4)-LEFT($A1,4)+1),LEFT($A1,­4)+COLUMNS($B$1:B1)-1,"")

  • Cool!

  • I like VBA Macro,No much calculation of Formulas no more data added into Excel file.. simply just run the macro and complete My Work..

  • Yes, VBA is a great way to go!

see all

All Comments (16)

Sign In or Sign Up now to post a comment!
  • Some do love the VBA, though!

  • I am like you, though, I always want to solve it myself first. After hanging out at the Mr Excel Message Board for years though, I understand that I almost never get the best most efficient solution, so after i try, I look at other people's cool solutions!

  • I don't think it needs to be that complcated. Watch the video and see if you agree. It basically comes down to LEFT, RIGHT and COLUMNS...

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more