Shub
Shub

Reputation: 111

Excel Data Entry made faster with Macro?

I am currently trying write a macro in excel to help shorten the time that this will take. I have water sample data for 10 different manholes and each were sampled quarterly since 1994. Because of this, I have a total of 75 dates that I need to input per manhole for this spreadsheet. Each of these dates has 97 rows of information that is input into this sheet and then a space before going to the next date. My ultimate question is, how can I take the dates shown from the first image and copy the first one 97 times, then second 97 times without redundantly doing so. Example is the image attached.enter image description here

Upvotes: 0

Views: 128

Answers (1)

Chad Kennedy
Chad Kennedy

Reputation: 1736

In column A have an integer sequence, starting at 0 and going up. In column B, do integer division on column A (QUOTIENT). You'll integer divide by the number of times you want things repeated (97). Then in column C, use VLOOKUP, taking the value from column B as the index into your lookup table, to "copy" the values for dates.

If you have the same measurements for each date, you can use a new column that uses MOD on column A, then use that as the index for a second VLOOKUP into your measurements lookup table.

Upvotes: 1

Related Questions