PDA

View Full Version : Conditional Cell Location



Parsnips
08-18-2011, 11:37 AM
Hi!

How can I get a merged cell with data in it to move based on the value of a different cell? For example, if my merged cell goes from B2-D2, how can I get it to move to C2-E2, depending on the value of another cell?

Thanks!

mancubus
08-18-2011, 11:25 PM
hi...
like this?


Sub Cut_Paste_Macro()
If Range("Another_Cell").Value = MyValue Then
Range("B2:D2").UnMerge
Range("B2:D2").Cut Range("C2")
Range("C2:E2").Merge
End If
End Sub