Find Value - Merge the 15 cells to the right

jwb1012

Board Regular
Joined
Oct 17, 2016
Messages
167
Hello, I am using the code below to loop through all of my sheets, find the sheets that are named "Labor BOE...", then find the text "Method of Quoting:" within column B, and resize this row.

I was also hoping to merge the 15 cells to the right... so this would mean it would find "method of quoting:", and merge column C-Q of this row.

Any thoughts? Thank you in advance for any thoughts/guidance/support.


Code:
Sub EnlargeMethodOfQuoting()
Dim Sh As Worksheet
Dim x As Integer
Dim End_Row As Integer
    For Each Sh In ActiveWorkbook.Sheets
        If Left(Sh.Name, 9) = "Labor BOE" Then
                
        Dest_Lastrow = Sh.UsedRange.Row - 1 + ActiveSheet.UsedRange.Rows.Count
        Dest_LastColumn = ActiveSheet.UsedRange.Column - 1 + ActiveSheet.UsedRange.Columns.Count
                
            For lRow = Dest_Lastrow To 3 Step -1
                With Sh.Cells(lRow, "B")
                    On Error Resume Next
                        .Find("Method of Quoting:", , xlValues, xlWhole).RowHeight = 100
                    On Error GoTo 0
                End With
                
            Next lRow
        End If
    Next Sh
End Sub
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Forum statistics

Threads
1,215,584
Messages
6,125,673
Members
449,248
Latest member
wayneho98

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