Within a range, if a cell contains something, copy the row below(formula and all)and paste between the two.

NeilWilliams

New Member
Joined
Mar 7, 2022
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hello to all,

I am struggling to find a macro that does what I want it to do, I have tried to edit various solutions from the internet but I've had no success.

What I want to do is:
1. Select a range of rows, for example (29:33).
2. Allow cells (B29:B31) to contain text with no actions.
3. Then when the user types any text/number in cell (B32).
4. The macro copies the row below (33) with all of its formulas.
5. Then inserts the copy between rows (32:33).
6. Then the range extends to include the new row (29:34)
7. When the new cell (B33) has contents in...
8. The macro copies the row below (34)
9. Then pastes it between row (33:34).
10. and repeats.

I hope that this explanation is good enough, but for clarity I have attached an image below.
The aim is to automatically expand the section as the list grows.

Thank you in advance for any help that you can offer.
Kind regards
Neil
 

Attachments

  • Excel_Snip.JPG
    Excel_Snip.JPG
    69.3 KB · Views: 9

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Forum statistics

Threads
1,214,978
Messages
6,122,549
Members
449,089
Latest member
davidcom

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top