View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Value of Merged Cells

Could it be that you got your variables mixed up.

value_merge2 is assigned, then you use msgbox value_merge2

And same thing with the next statement.

ps. The code worked fine for me in my simple testing.

MLT wrote:

I am trying to get at the value of the merged cells E1:G1.

This code works fine:
value_merge2 = Sheets("Sheet2").Range("E1").Value
MsgBox value_merge1

This code just gives a blank:
value_merge1 = Sheets("Sheet2").Range("A1").Offset(0, 4).Value
MsgBox value_merge2

Is there a way to use something like the second set of code to still
give the value of the merged cells?


--

Dave Peterson