View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
TLuebke TLuebke is offline
external usenet poster
 
Posts: 4
Default Merging columns based on cell condition

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