I have this code, I would like to add another column to print, after it fines "Aggregate", can anyone help me with the vba santax to add another column after "aggregate"?
Function GetAction() As Integer
Dim rng1 As Range
Set rng1 = ActiveSheet.UsedRange.Find("Aggregate", , xlValues, xlWhole)
If Not rng1 Is Nothing Then
MsgBox "Found in column " & rng1.Column
Else
MsgBox "Not found", vbCritical
End If
GetAction = rng1.Column
End Function
Function GetCol(ColumnNumber) As String
FuncRange = Cells(38, ColumnNumber).AddressLocal(False, False)
FuncColLength = Len(FuncRange)
GetCol = Left(FuncRange, FuncColLength)
End Function
Function onlyDigits(s As String) As String
Dim retval As String
Dim i As Integer
retval = ""
For i = 1 To Len(s)
If Mid(s, i, 1) >= "0" And Mid(s, i, 1) <= "9" Then
retval = retval + Mid(s, i, 1)
End If
Next
onlyDigits = retval
End Function
Bookmarks