Value of Merged Cells

M

MLT

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?
 
D

Dave Peterson

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top