0

I have a set of dates (a range of years) for each car part in a spread sheet. Each part has a different year range. For example, a muffler fits a Ford Mustang from 1972-1977. A mirror fits a Chevy Chevelle from 1969-1976. There are 8,000 parts listed on the spreadsheet with date (year) ranges in a cell. (The ranges are actually in two cells, first cell is starting year and second cell is ending year). For each part, I need a listing (row) for each year in the range. For example, the muffler for the Mustang would go from one row:

1972-1977 | Ford | Mustang | Muffler

to six rows:

1972 | Ford | Mustang | Muffler
1973 | Ford | Mustang | Muffler
1974 | Ford | Mustang | Muffler

etc. Can I extract these rows from the year range data already contained in the spreadsheet? If so, how?
Thanks!

bones_bare
  • 31
  • 1
  • 9
  • my answer in the following thread should get you started. if you still have trouble, show us what you have so far... http://stackoverflow.com/questions/25394882/move-data-from-121-text-files-into-an-excel-spreadsheet-with-particular-layout/25444620#25444620 – user3616725 Sep 04 '14 at 15:34

1 Answers1

0

I would try using VBA. First, use excel text to columns and use "-" as a delimiter to put the two years in separate columns. Subtract the years in a new column, so 1980-1977 = 3 in a new column. Then using VBA pull that 3 to count how many rows you want, starting from the lowest year and looping through (3) times.

joeumlo
  • 51
  • 1
  • 8
  • I think that I am going to try to find a solution using PHP. I am new to programming and most of my coding has been done on the web. I think I will find more success uploading the file to a MySQL DB and running a loop with a csv file output. I am going to use the year range suggestion (subtracting the years to get the number of times to run the loop). Thanks for the guidance. – bones_bare Sep 04 '14 at 21:33