Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hide Columns Based on Condition Skornia115 Excel Programming 9 July 6th 06 04:49 PM
Hide Columns Based on Condition [email protected] Excel Programming 1 July 5th 06 07:40 PM
colore cell based on condition gaba Excel Programming 5 November 2nd 04 08:11 AM
Delete Columns based on a condition Joel Mills Excel Programming 3 August 6th 04 07:21 PM


All times are GMT +1. The time now is 03:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"