Merge cells

Copper Contributor

Hi, 

Is there any way for conditional "Merge Cell" ?

 

For instance  : I wanna Merge two neighbour cells If (A1-A2)<2

 

is it possible ? please help me

2 Replies

@TURGUT1800  as far as I know, the answer is no and I don't know why you want to.  That said, there are other tricks you might be able to do to give the effect you want (if we understand what you want better).  For example, you could use conditional formatting to change borders and you might even be able to use custom number formatting to shift the data in the cells to the right/left to make it look centered.  

@TURGUT1800 

 

It might be possible with a macro or VBA routine.

 

But the truth is you shouldn't really "wanna" do that.

 

If you're in a true Excel Table, you probably can't anyway. But even if not, I would think an equally visible way--and isn't visibility the point?--to handle it would be to use conditional formatting to make those two cells, already adjacent to one another, the same color. That way, if the condition changes and they no longer qualify for that, the color disappears.

 

Even assuming that a conditional merge could be undone by yet another macro or VBA routine, it just would be a messier way to handle it.