Results 1 to 2 of 2

Adding to VBA code to include 1 column

Threaded View

Phamaily Adding to VBA code to include... 01-13-2014, 06:03 PM
protonLeah Re: Adding to VBA code to... 01-14-2014, 01:20 AM
  1. #1
    Registered User
    Join Date
    03-21-2012
    Location
    San Diego
    MS-Off Ver
    Excel 2010
    Posts
    6

    Adding to VBA code to include 1 column

    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
    Last edited by JBeaucaire; 01-13-2014 at 06:55 PM. Reason: added missing CODE tags. Please read and follow the forum rules, link above in the menu bar.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. VBA Code for Adding % Diff Column to Numerous Sheets?
    By kestefon in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-21-2013, 01:50 PM
  2. Adding to VBA code to copy a cell in the previous column
    By ChurchillClaire in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-02-2012, 09:07 AM
  3. Need help to modify code to include more than 1 Column
    By coreytroy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-15-2007, 02:08 AM
  4. code for adding a '% of total' column
    By overcanyon in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-19-2005, 01:30 PM
  5. Adding up cells that include text in them
    By Alan in forum Excel General
    Replies: 1
    Last Post: 08-24-2005, 04:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1