How can i use Macro to create table depends on number of rows and columns that included field names

Soly_Man

New Member
Joined
Feb 19, 2020
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hello ,

I am new in using macro ,i would like to ask about how can i create table depends on number of rows and columns that included field names ,do we have method that it counts number of rows and create table depend on it .

because my data in excel sheet will not have the same range and it is different from file to another but it has no tables ,i want to write a code that implement on the whole excel sheet for each sheet in this excel each excel has around 3 sheets with different size of table and design table for each rows has field names .

i found many articles but all of them i have to select the range and so on but in my case ,i hany excel files and each one has different in rows in the table so i want the program to do it automatic .

1582099927524.png



1582099961039.png


1582099997689.png


Eacch table contains data under each other ,but i do not know how many rows will be in the table so i want from macro to do it automatic to calculate the number of rows and do the table as picture
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

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