Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Formatting Excel worskheet

I want to format a worksheet that merges cells A3 to A6
then borders A3 to A6 and then go accross to G3,G6. Iwant
this to loop through unitl EOF
  #2   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Formatting Excel worskheet

I take it that it is only in row 6 that you are doing this
routine, and that the merged cells contain some text as
headings. If so then find the last column with text, then
run a loop routine to merge the cells by:

ActiveSheet.Range("IV3").Select
Selection.End(xlToLeft).Select
col = ActiveCell.Column 'returns the column reference for
the last column with text.
For i = 1 To col
With ActiveSheet
.Range(.Cells(3, i), .Cells(6, i)).Select
End With
With Selection
.MergeCells = True
End With

Next i

BOL
DavidC
-----Original Message-----
I want to format a worksheet that merges cells A3 to A6
then borders A3 to A6 and then go accross to G3,G6. Iwant
this to loop through unitl EOF
.

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
Formatting lost when saving excel 2003 file using excel 2007 Anamika Excel Discussion (Misc queries) 1 December 29th 08 04:24 PM
"Excel encountered an error and had to remove some formatting toavoid corrupting the workbook. Please re-check your formatting carefully." Greg Lovern Excel Discussion (Misc queries) 0 July 18th 08 09:42 PM
Saving Excel 2007 conditional formatting in Excel 2003 format [email protected] Excel Discussion (Misc queries) 0 March 28th 08 06:42 AM
expanding custom formatting without removing existing cell formatting? Keith Excel Worksheet Functions 3 December 27th 06 01:54 PM
how do i remove the limit set on the worskheet i am working on arcticale Excel Discussion (Misc queries) 2 April 26th 06 09:37 AM


All times are GMT +1. The time now is 12:53 AM.

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"