Caros,
Continuando na linha: "Revisitando As primeiras funções que desenvolvi".
Como deletar as colunas que estão vazias num range informado?
Sub DelEmptyC (DeleteRange As Range)' Deleta todas as colunas no RangeDim cCount As Integer, c As IntegerIf DeleteRange Is Nothing Then Exit SubIf DeleteRange.Areas.Count > 1 Then Exit SubWith DeleteRangeLet cCount = .Columns.CountFor c = cCount To 1 Step -1If Application.CountA(.Columns(c)) = 0 Then.Columns(c).EntireColumn.DeleteEnd IfNext cEnd WithEnd Sub
André Luiz Bernardes
A&A® - Work smart, not hard in any place.Skype: inanyplace