MENU

Fun & Interesting

Working with Tables in Microsoft Excel VBA

Siddharth Rout 11,406 3 years ago
Video Not Working? Fix It Now

Tables are one of Excel’s most powerful yet underutilized features. They are the most efficient way to organize your data in a meaningful way. A table consists of column headers, rows, columns, data range, and cell range. You can store different types of data in the table. For example, Employee Records, Appointments, Sales Data etc. Tables are also referred to as ListObjects within VBA because they are a replacement for the Lists functionality which was present in Excel 2003. In this video, we will go over how to use VBA to create a table, interact with a table, resize a table, filter a table and perform other table-related tasks. ---- 00:00 Intro 01:30 Table Structure. Visual Interface of a Table 02:55 Create your first Table using ListObjects.Add method 08:40 Neat trick to find the name of a particular Table Style 12:04 Convert Table to Range using ListObject.Unlist method 12:28 Find the name of the Table using ListObject.Name property 14:58 Check if Worksheet has a Table. Also find if the worksheet has a Table with a specific name 20:04 Naming the Table using ListObject.Name property 24:51 Working with Table Style Options like Totals Row, Banded Rows etc using ListObject.ShowTotals, ListObject.ShowTableStyleRowStripes, ListObject.ShowTableStyleColumnStripes, ListObject.ShowHeaders, ListObject.ShowAutoFilterDropDown, ListObject.ShowTableStyleFirstColumn, ListObject.ShowTableStyleLastColumn 31:37 Reading data from different sections of a Table using ListObject.HeaderRowRange, ListObject.TotalsRowRange, ListObject.DataBodyRange, ListObject.ListRows, ListObject.ListColumns 38:29 Adding and Deleting Rows/Columns in a Table 44:57 Sorting a Table 48:52 Resizing a Table 52:35 Outro ---- Equipment/Software used for recording and editing this video Camera: https://amzn.to/3IJqos7 Microphone: https://amzn.to/3MhA5Ac Lights: https://amzn.to/3ptjxLV Camtesia: https://techsmith.z6rjha.net/SidRecommendsCamtasia Type C to Type A: https://amzn.to/3qqDX8f Disclaimer: The above are affiliate links. At no additional cost to you, we will receive a small commission if you make a purchase using the above links. This helps support the channel. Thank you in advance for your support! Connect with me on social: LinkedIn: https://www.linkedin.com/in/siddharthrout/ Facebook: https://www.facebook.com/SidzRout Instagram: https://www.instagram.com/sidzthekidz/ Stackoverflow: https://stackoverflow.com/users/1140579/siddharth-rout Microsoft Excel VBA Facebook Group: https://www.facebook.com/groups/msexcelvba #ExcelVBA #ExcelMacro #VBAExcel #MSExcel #Excel

Comment