Weird one, I insert rows after new data set but.........

cizzett

Board Regular
Joined
Jan 10, 2019
Messages
121
Is it possible to insert the row as a merged range from column 1-7 (A:G) and set it to black fill with white bold text?

This is what im currently using but I am not sure how to integrate it since the blank row location will be dynamic depending on the data

Code:
Sub IRCV()

   Dim lRow As Long
   For lRow = Cells(Cells.Rows.Count, "D").End(xlUp).Row To 2 Step -1
      If Cells(lRow, "D") <> Cells(lRow - 1, "D") Then Rows(lRow).EntireRow.Insert
   Next lRow
   
End Sub
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Basically I want to find any blank rows with data in the row below it and merge that row the width of the data (A:G) any ideas? Id really appreciate any advice, Ive found a lot of find blank rows etc but haven't quite been able to get anything to work.
 
Upvote 0

Forum statistics

Threads
1,216,759
Messages
6,132,551
Members
449,735
Latest member
Gary_M

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