Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Merging cells changes values, bug?

Hello,

I have a very strange problem in excel vba. I'm making some kind of
printable cards. Several cards can be displayed on the sheet (report
result) and they contain information which comes from a row on another
sheet (Backlog list). When the code is like below, everything wents
ok. Except that I want merged cells for C8:C9 and C12:C13 in the
first card and the corresponding ranges in the next cards. I want to
do that with the code that is in comment below. But when I do that,
all the merged cells of all cards get the same value of the merged
cells of the first card, while all I'm doing is changing a
property.... Maybe it is becoz the lay-out was copied from the first
card for every other card, I don't know, and that there then exists
some internal link? Anyway, the correct values are displayed when the
cells are not merged. This seems like a bug? Anyone knows if there
is a solution?

Kind regards,

Bart

Do While InStr(1, options_string, ",") < 0
Rows("1:15").Copy
Rows("1:15").Offset(15 * counter, 0).Select
ActiveSheet.Paste
'Range("B8:B9").Offset(15 * counter, 1).MergeCells = True
'Range("B8:B9").Offset(15 * counter, 1).WrapText = True
'Range("B12:B13").Offset(15 * counter, 1).MergeCells = True
'Range("B12:B13").Offset(15 * counter, 1).WrapText = True
current_row = left(options_string, InStr(1, options_string, ",") -
1)
options_string = right(options_string, Len(options_string) -
InStr(1, options_string, ","))
With Worksheets("Report Result")

.Range("C3").Offset(15 * counter, 0).Value = "Backlog Item " &
Worksheets("Backlog List").Range("B" & current_row).Value
.Range("C5").Offset(15 * counter, 0).Value =
Worksheets("Backlog List").Range("D" & current_row).Value
.Range("C8").Offset(15 * counter, 0).Value =
Worksheets("Backlog List").Range("H" & current_row).Value

.Range("C12").Offset(15 * counter, 0).Value =
Worksheets("Backlog List").Range("G" & current_row).Value

.Range("E5").Offset(15 * counter, 0).Value =
Worksheets("Backlog List").Range("E" & current_row).Value
.Range("E8").Offset(15 * counter, 0).Value =
Worksheets("Backlog List").Range("F" & current_row).Value


End With
counter = counter + 1
Loop

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
Merging files with nearly identical values in one column Allen Excel Discussion (Misc queries) 3 March 4th 09 05:09 PM
Getting 0 values when merging for labels thandy Excel Discussion (Misc queries) 0 December 18th 06 03:37 PM
Merging multiple WS with diff values into one master Chris Excel Discussion (Misc queries) 0 May 2nd 06 11:57 PM
Merging cells with the same values Iain Excel Discussion (Misc queries) 0 August 8th 05 06:35 PM
Merging Two Cells and Keeping the Values Raymond Excel Discussion (Misc queries) 10 May 30th 05 08:05 PM


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