Merging columns based on cell condition

T

TLuebke

Reusing this snippet from 2 days ago (thankyou very much) When the condition
in Column A is true I need to merge the cells in columns B-H for that row and
center the string from an input box.
Dim Rng As Range
Dim r As Range, i As Long
Dim strname As String

strname = InputBox("Which Term?", "Term", "")
If strname = vbNullString Then
Exit Sub
End If
Set Rng = Range("A1:A1000")
For i = Rng(Rng.Count).Row To Rng(1).Row Step -1
Set r = cells(i, Rng.Column)

If r.Font.Bold Then

??? ----> Merge columns B-H and center strname <---???

r.EntireRow.PageBreak = xlManual
End If
Next i
End Sub

Your in confusion

Todd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top