![]() However, sometimes the data set I receive may came in random order, so sometimes the data set I receive might already have some "duplicate rows", so I need to count the total count of the value in Column D (which is the job of Column A), then subtract from QTY # from Column E. But IF Column A # is smaller than Column E #, then I need VBA to copy that row & insert remaining amount of copied rows beneath the row.Īs shown below in the mini sheet, starting from 2nd row, I already had formulas planted in Column A to count how many duplicates of cell value in Column D, but I needed the total rows to match the QTY # from Column E. If Column A # is same/larger than Column E #, then can ignore & move to next row. Sometimes the # in Column A may be larger or smaller than Column E. Column E "QTY" is the # of rows I need to match, Column A is how many rows of Column D's value already exist. Inserting new rows based on cell value, and copying data to the new rowsīut in my case, before inserting new copied rows, the amount of rows depends on more than 1 factor:ġst factor is IF Column B says "Match JNT", then proceed to 2nd factor, but if Column B display #N/A or empty, then ignore that row & move to next row below.Ģnd factor is a calculation from 2 different cell values (Column E & Column A). Hold down CONTROL, click the selected rows, and. It’s okay if the rows contain data, because it will insert the rows above these rows. For example, to insert five blank rows, select five rows. Tip: Select the same number of rows as you want to insert. The closest case I found is this one here: Select the heading of the row above where you want to insert additional rows. I've been searching around but cant seem to find the right answer.
0 Comments
Leave a Reply. |