Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
snsd wrote:
I have a workbook with about 150 worksheets in it. Each worksheet has 12 rows of text .. Sub zMerge() ' merges A1:A12 into A1 Dim isheet%, irow&, icol%, s1$, s2$ icol = 1 For isheet = 1 To ActiveWorkbook.Sheets.Count ActiveWorkbook.Sheets(isheet).Select MsgBox "Now doing sheet " & _ ActiveWorkbook.Sheets(isheet).Name For irow = 1 To 12 s1 = ActiveWorkbook.Sheets(isheet).Cells(irow, icol) If irow = 1 Then s2 = s1 Else If s1 < "" Then s2 = s2 & " " & s1 End If ActiveWorkbook.Sheets(isheet).Cells(irow, icol) = "" Next irow ActiveWorkbook.Sheets(isheet).Cells(1, 1) = s2 Next isheet End Sub ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! 100,000 Newsgroups ---= East/West-Coast Server Farms - Total Privacy via Encryption =--- |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Add cells on two adjacent rows but non-adjacent columns | Excel Worksheet Functions | |||
Compare adjacent fields in adjacent rows | New Users to Excel | |||
Concatenate multiple rows and columns into 1 cell | Excel Discussion (Misc queries) | |||
How do I Select Multiple Non Adjacent Rows based on a cell value? | Excel Worksheet Functions | |||
How to concatenate adjacent cells in a range without using &? | Excel Worksheet Functions |