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
- 24146 reads
Recent comments
5 years 36 weeks ago
6 years 22 weeks ago
6 years 34 weeks ago
6 years 37 weeks ago
6 years 38 weeks ago
6 years 43 weeks ago
6 years 52 weeks ago
7 years 2 days ago
7 years 3 days ago
7 years 3 days ago