Help! Find certain text within a column and insert 2 rows below then copy and paste data into those rows

Miche25

New Member
Joined
Jan 5, 2016
Messages
24
Within sheet 1 of my work book I have data relating to customers - the customers data appears under the customers name (example below). Each month the data changes and therefore the customer name does not appear on the same row as prior months as the data is not static. The headings for each data set i.e. Customer Name 1 (heading) appear in column B.

Within sheet 2 the data is fixed and therefore the rows wont change each month.

I need vba code which which on sheet 1 will find the text "Customer Name 1" for example insert 2 rows directly underneath the heading. Then copy and paste a range of data relating to Customer 1 from sheet 2 and paste as a picture (as the column sizes differ on sheet 2 to sheet 1) within the newly inserted rows on sheet 1. then repeat the process for customers 2 & 3. Is there a way to do this?

Customer Name 1 (heading in column B)

Column B Column C Column D
Date Product Price
xx xxxx xxxxx
xx xxxx xxxxx

Customer Name 2 (heading in Column B)

Column B Column C Column D
Date Product Price
xx xxxx xxxxx
xx xxxx xxxxx
xx x xx xxxxx

Customer Name 3 (heading in Column B)

Column B Column C Column D
Date Product Price
xx xxxx xxxxx
 
Last edited:

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

Forum statistics

Threads
1,215,679
Messages
6,126,186
Members
449,296
Latest member
tinneytwin

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