Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 121
Default Merge Cells with excel 2003

Hello,

I have a worksheet that I would like to merge 2 cells each row (200
rows and several worksheets) begining with A6:B6.

Below is a code I've tried to modify but I still can't get it to work
right. Can this code be changed to merge 2 cells begining with A6:B6
through 200 rows?

Sub TryNow2()
Dim i As Integer
For i = 0 To 2
Cells(6, i * 1 + 1).Resize(1, 2).Merge
Next i
End Sub

Thanks for your help in advance,
jfcby

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Merge Cells with excel 2003

Your code as written will walk through the columns not the rows. Your
counter should be in the first part of the parenth, i.e.
For i = 0 To 194
Cells(i*1+6,1)

"jfcby" wrote:

Hello,

I have a worksheet that I would like to merge 2 cells each row (200
rows and several worksheets) begining with A6:B6.

Below is a code I've tried to modify but I still can't get it to work
right. Can this code be changed to merge 2 cells begining with A6:B6
through 200 rows?

Sub TryNow2()
Dim i As Integer
For i = 0 To 2
Cells(6, i * 1 + 1).Resize(1, 2).Merge
Next i
End Sub

Thanks for your help in advance,
jfcby


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 121
Default Merge Cells with excel 2003

Thank you JLGWhiz the code modification works great!!!!

jfcby

JLGWhiz wrote:
Your code as written will walk through the columns not the rows. Your
counter should be in the first part of the parenth, i.e.
For i = 0 To 194
Cells(i*1+6,1)

"jfcby" wrote:

Hello,

I have a worksheet that I would like to merge 2 cells each row (200
rows and several worksheets) begining with A6:B6.

Below is a code I've tried to modify but I still can't get it to work
right. Can this code be changed to merge 2 cells begining with A6:B6
through 200 rows?

Sub TryNow2()
Dim i As Integer
For i = 0 To 2
Cells(6, i * 1 + 1).Resize(1, 2).Merge
Next i
End Sub

Thanks for your help in advance,
jfcby



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
how to delete and insert in a two cells merge using Access 2003? Dubois2U Excel Worksheet Functions 2 January 14th 10 11:20 PM
excel 2003: mail merge issue shanna Excel Discussion (Misc queries) 3 December 31st 08 10:46 PM
Need help with mail merge - excel 2003 to word 2003 please.. Sara Excel Discussion (Misc queries) 0 May 7th 07 11:24 PM
Need to select 4 cells and merge them using Excell 2003 jfcby[_2_] Excel Programming 2 August 29th 06 06:00 PM
Merge cells in Excel 2003 doesn't show up on Format Alignment Bob Excel Discussion (Misc queries) 1 October 19th 05 03:50 PM


All times are GMT +1. The time now is 11:43 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"