How to automate the generation of a MASTER worksheet from two worksheets with a different layout?

Nite0wls

New Member
Joined
May 21, 2014
Messages
33
Office Version
  1. 2019
  2. 2013
Platform
  1. Windows
Dear all,

I'm looking into how I can create a MASTER worksheet from two different worksheets. The two sheets are not equal in layout and the least complex one need to be transformed during the import to match with the other worksheet.

A simplified version of each worksheet is below as well the wanted result.


I would like to automate the building of the MASTER worksheet to prevent mistakes during manual copy and pasting the information. On import of the information an additional field is added to determine the origin of the line and to colour code the lines based on their original worksheet.


Thanks for any suggestions on how to approach this challenge.


First WorkSheet - DNIS:


Tab Pos DNISDNISPurposeBrandDepartmentRegionCountryProductDDIUserLanguagesAltWorkgroupAltDisplayAltGreetingAltWhisperAltSkillsProductMenuInQueueAudioRecordCallsScreenPopDispositionHolidayEmergencyBatPhoneSourceDNISCarrirerAdminContactNotes
1441173048804SalesRegusSSCUKUKen-GBISTISTTRUETRUETRUEBTSpare Nr
2441173048805SalesRegusSSCUKUKen-GBISTISTTRUETRUETRUEBTSpare Nr
3441173048806DDIRegusSSCUKUKTom.Jonesen-GBISTISTTRUETRUETRUEBTSpare Nr

<tbody>
</tbody>



Second Worksheet - REGUS:


Tab Pos RegusDNISProductRetailGroupAlternate DisplayAlternate GreetingAlternate WhisperCountryLanguagesSite
181357641200 >SPARE NrAustraliaen-AUAPAC
181357641201 >AU HotlineAustraliaen-AUAPAC
181357641202 >MRAU BMP LineAustraliaen-AUAPAC

<tbody>
</tbody>



Combined Worksheet - MASTER:
DNIS Table RowDNISPurposeBrandDepartmentRegionCountryProductDDIUserLanguagesAltWorkgroupAltDisplayAltGreetingAltWhisperAltSkillsProductMenuInQueueAudioRecordCallsScreenPopDispositionHolidayEmergencyBatPhoneSourceDNISCarrirerAdminContactNotesTable
REGUS Table RowDNISn/an/aRetailGroupSiteCountryProductn/aLanguagesn/aAltDisplayAltGreetingAltWhispern/an/an/an/an/an/an/an/an/an/an/an/an/aTable
1441173048804SalesRegusSSCUKUKen-GBISTISTTRUETRUETRUEBTSpare NrDNIS
2441173048805SalesRegusSSCUKUKen-GBISTISTTRUETRUETRUEBTSpare NrDNIS
3441173048806DDIRegusSSCUKUKTom.Jonesen-GBISTISTTRUETRUETRUEBTSpare NrDNIS
181357641200SPARE NrAPACAustraliaen-AUREGUS
281357641201AU HotlineAPACAustraliaen-AUREGUS
381357641202AU BMP LineAPACAustraliaMRen-AUREGUS

<tbody>
</tbody>
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
so the first table is copied in as is and the second table is copied (table 2 col to master col) as below?

1-1......2-2.....4-5....10-6.....8-7.......9-10......5-12......6-13....7-14.....and column with table heading to col 28 ?
 
Upvote 0
so the first table is copied in as is and the second table is copied (table 2 col to master col) as below?

1-1......2-2.....4-5....10-6.....8-7.......9-10......5-12......6-13....7-14.....and column with table heading to col 28 ?

Your almost correct, the exact match is:
1 - 1
2 - 2
4 - 5
10 - 6
8 - 7
3 - 8
9 - 10
5 - 12
6 -13
7 - 14

and the added TABLE description in position 28

Thanks!
 
Upvote 0
make a copy of second table, switch on record macro, and do a series of control x (cut) and paste on whole columns to get them into the correct locations for pasting, stop macro then highlight all data in table 2, go to first empty cell in col A and paste

the macro can be used each day like a robot..........
 
Upvote 0

Forum statistics

Threads
1,216,101
Messages
6,128,842
Members
449,471
Latest member
lachbee

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top