XLA routines: EE_ClearColumns
EE_ClearColumns clears all the data in the columns specified
Sub EE_ClearColumns(FromCol As Variant, Optional ToCol As Variant) ' - FromCol and ToCol can either be a column, a letter, a number, or a heading ' clears all data from the col 'http://excelexperts.com/xla-routines-eeClearColumns for updates on this routine If Not IsMissing(ToCol) Then If ToCol = "" Then ToCol = FromCol End If Else ToCol = FromCol End If If VarType(ToCol) = vbString Then ToCol = CLng(range(ToCol & "1").Column) End If If VarType(FromCol) = vbString Then FromCol = CLng(range(FromCol & "1").Column) End If Dim i As Long For i = FromCol To ToCol Columns(i).ClearContents Next End Sub
»
- Nick's blog
- Login or register to post comments
- 3330 reads
Recent comments
5 years 34 weeks ago
6 years 20 weeks ago
6 years 32 weeks ago
6 years 35 weeks ago
6 years 36 weeks ago
6 years 42 weeks ago
6 years 50 weeks ago
6 years 50 weeks ago
6 years 50 weeks ago
6 years 50 weeks ago