Posts by markw16

    Re: Insert Rows Based on Criteria, Run Counter, Fill Down Empty Cells - $75 for answe


    Hi junho,

    It looks like this is what I need.

    I'm still working through a very large spreadsheet to "season" it in order to run this macro properly. This will probably take me into tomorrow. I will contact you over the weekend to set up payment or, if I run into any problems, to ask you if you can tweak the macro first before I pay.

    Does that sound reasonable?


    Thanks for the quick response, and again, I'll be back in touch within the next 24 hours.

    Mark

    I need a macro that goes through a spreadsheet and does 3 things for each existing row ... To preface, I have 2 columns of interest. Column A has numbers in it (whole numbers) and column B is blank. Across the rest of the columns is my actual data. So for every existing row in the spreadsheet, the macro needs to:


    1) Insert X number of rows below the existing row where X is equal to the value in column A.
    2) Count off the rows in column B starting with the existing row ... In other words, the macro would put a "1" in column B for the existing row and then it would increment by 1 for each new row it inserts below. The count in column B would restart at 1 for the next EXISTING row.
    3) Fill down the data in all other columns into the blank rows (no formulas, literally just copy down the same data from the existing row into the newly inserted rows, stopping, of course, before the next existing row).

    Below is an illustration for 2 rows of data before and after:

    Before macro run:
    A B C D E F (column headings)
    3 Q R S T (data)
    2 U V W X

    After:
    A B C D E F
    3 1 Q R S T
    2 Q R S T
    3 Q R S T
    4 Q R S T
    2 1 U V W X
    2 U V W X
    3 U V W X

    So the macro looked in column A in the first existing row, saw the value "3" and inserted 3 rows below. It then counted off the rows in column B starting with "1" in the existing row and ending with "4" in the 3rd inserted row. Finally, it filled down the data in the other columns into the newly inserted rows.

    For the next existing row, it looked in column A, saw the value "2" and inserted 2 rows below. Again, it counted the rows in column B, starting with a "1" in the existing row and ending with "3" in the 2nd inserted row. And finally, it filled down the data in the other columns into the newly inserted rows.

    Please let me know if I can clarify. $75 for a macro that works exactly as I have specified ... One more note, the macro should not be dependent on how many columns of data are in the spreadsheet. So if my data goes out to column X, the macro should still work as specified, filling down the data in the existing row, columns C through X, into the newly inserted rows.

    Thanks,
    MW