VBA Copy columns with non-similar header name between two workbooks

AbdulkareemAlhassni

New Member
Joined
Nov 16, 2018
Messages
41
Hi there,

how can i make a condition to copy then insert a column to another workbook,

the only condition is that, if this columnd header exists in the current workbook dont copy it !

EXAMPLE:

workbook1

NameAgeCityEmail

<tbody>
</tbody>

Workbook2


NameTitleAgeSalary

<tbody>
</tbody>

so when i copy from "Workbook2" to "Workbook1" ==> i will get

New Workbook1

NameTitleSalaryAgeCityEmail

<tbody>
</tbody>


hope am clear :)

thank you.:biggrin:
 

Some videos you may like

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

AbdulkareemAlhassni

New Member
Joined
Nov 16, 2018
Messages
41
Hi there,

how can i make a condition to copy then insert a column to another workbook,

the only condition is that, if this columnd header exists in the current workbook dont copy it !

EXAMPLE:

workbook1

NameAgeCityEmail

<tbody>
</tbody>

Workbook2


NameTitleAgeSalary

<tbody>
</tbody>

so when i copy from "Workbook2" to "Workbook1" ==> i will get

New Workbook1

NameTitleSalaryAgeCityEmail

<tbody>
</tbody>


hope am clear :)

thank you.:biggrin:
One important thing that

Name and age should be a way to copy the data from the other columns !
 

AbdulkareemAlhassni

New Member
Joined
Nov 16, 2018
Messages
41
Hi there,

how can i make a condition to copy then insert a column to another workbook,

the only condition is that, if this columnd header exists in the current workbook dont copy it !

EXAMPLE:

workbook1

NameAgeCityEmail

<tbody>
</tbody>

Workbook2


NameTitleAgeSalary

<tbody>
</tbody>

so when i copy from "Workbook2" to "Workbook1" ==> i will get

New Workbook1

NameTitleSalaryAgeCityEmail

<tbody>
</tbody>


hope am clear :)

thank you.:biggrin:
am really stuck here
x(

please help
 

Forum statistics

Threads
1,089,183
Messages
5,406,679
Members
403,101
Latest member
Sp8y8

This Week's Hot Topics

Top