Create a new workbook and worksheet by getting the data from the certain columns and rows

Dostonus

New Member
Joined
Jul 19, 2020
Messages
7
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
Hi folks
I need your help on excel file transformation. So, I want to create database table names which has been originally stored in excel file as provided below. Thus, I need VBA code to copy out the certain cells and paste them as a filename, sheet name, column name and as a row. The desired output is something like in the picture attached below.
I really appreciate your help guys, and I hope this answer to this thread can be also useful for users as well
Thank you in advance!


Filename1 Column Name2 Column Name3 Column Name4 Column Name1 Col Values2 Col Values3 Col Values4 Col Values
DepartmentsNameNum_EmpAddressBackup functionHR5Wall streetyes
I want this to be used as filename and sheetnameColumn namesRow values accordingly
 

Attachments

  • excel1.png
    excel1.png
    79.1 KB · Views: 6

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Forum statistics

Threads
1,214,873
Messages
6,122,029
Members
449,061
Latest member
TheRealJoaquin

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