Macro not copying correct data

Closed
Maclearner - Mar 29, 2010 at 10:48 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Mar 31, 2010 at 01:00 PM
hi m trying to copy column D from one tab and pasting it in another tab. When i luk into code it shows copying (D:D) but it selects columns A-D and pastes all the four columns in the another tab... Can you help me in this?
Related:

1 response

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Mar 29, 2010 at 02:44 PM
Columns("D").select
Selection.copy
Sheets("Sheet2").select
Cells(1, "A").select
activesheet.paste
0
Thank you for your help....but this code is also working fine for other columns but when I type for column D its taking data from A- D...
0
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Mar 30, 2010 at 08:12 AM
Because you must have a merged cell A-D in between
0
I have not merged any data myself . have just copied data from somewhr nd pasted in excel. Is there any solution for this?.how can i proceed further?
0
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Mar 31, 2010 at 01:00 PM
One thing that you can try is highlight the columns, right click and choose format and then go to alignment tab. At the bottom you would see merge option. If in the selected column there is a merge cells you would notice that the box is highlighted. Click it twice to remove the check box and click ok. That will remove any merge cells
0