XLA Routines: EE_AddTableCalculatedColumn
Advanced function for adding a calculated col to a table
Sub EE_AddTableCalculatedColumn(Header As String, Formula As String) 'http://excelexperts.com/xla-routines-eeAddTableCalculatedColumn for updates on this sub routine ' adds a calculated column to a table on the activesheet Dim HeaderCol As Long Dim myData As Range If Cells(1).CurrentRegion.Rows.Count = 1 Then Exit Sub ' no data Set myData = EE_TableGetColumnData(Header) myData.ClearContents HeaderCol = EE_TableHeadingCol(Header) Cells(2, HeaderCol) = Formula myData.value = myData.value End Sub
»
- Nick's blog
- Login or register to post comments
- 24343 reads
Recent comments
5 years 41 weeks ago
6 years 27 weeks ago
6 years 39 weeks ago
6 years 42 weeks ago
6 years 43 weeks ago
6 years 48 weeks ago
7 years 4 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago