I need a macro that finds the row that includes the text 'Tax included in each line' and adds 5 rows above it. The rows need to mimic the formulas in the 'Tax included in each line' row.
I hope this makes sense.
Thank you for the help.
I need a macro that finds the row that includes the text 'Tax included in each line' and adds 5 rows above it. The rows need to mimic the formulas in the 'Tax included in each line' row.
I hope this makes sense.
Thank you for the help.
Hi
Which column will contain the text? IS this text to also be copied to the inserted rows? Or is it a header in column A that is to be left blank. Is there only 1 row which will contain the text, or multiple rows?
Some more detail on your structure would be a help. Perhaps build an example file showing a sheet with the before structure, and a sheet with the after structure.
rylo
1. The column that contains the text is B but the cell is merged with C, D, and E.
2. The text is not to be copied into the inserted rows but the formula in column I is to be copied into the new rows.
I've attached a file trying to show what I mean.
Hi
Try
![]()
roww = Columns("B:E").Find(what:="Tax included in each line").Row Cells(roww, 1).Resize(5, 1).EntireRow.Insert Cells(roww - 1, 1).Resize(1, 9).Copy Destination:=Range(Cells(roww, 1), Cells(roww + 4, "I"))
HTH
rylo
Made a few adjustments to fit my larger worksheet and it worked perfectly.
Thank you so much.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks