• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Macro where there are merge cell

hansa

New Member
Hi

I've got a form where there are merged cells, I need to create a macro where it will copy and unmerged the cells and paste the data in a single cell for each and every field.

Actually I've been able to record the macro, but unfortunately for some fields it's not working due to the merge cells.

Please help.

Thanks.
 
Hansa

You should be able to copy and paste values without problems

Can you post your code?
 
Hi ,

Suppose you have the following cells merged : E12 , F12 , E13 and F13.

Suppose you have some data in E12.

To copy this data to another single cell , say B7 , just use the statement :

[B7] = [E12]

You can also use :

[E12].Copy [B7]

Narayan
 
Hi Hansa!

In your recorded macro.. at the very first line.. you can write.
cells.UnMerge
It will serve the purpose of Unmerging all the merge area.. now you can work usual.
 
Hi ,

Suppose you have the following cells merged : E12 , F12 , E13 and F13.

Suppose you have some data in E12.

To copy this data to another single cell , say B7 , just use the statement :

[B7] = [E12]

You can also use :

[E12].Copy [B7]

Narayan

OK thanks, i've been able to do it by using formulas.

thanks once again.
 
Back
Top