Results 1 to 2 of 2

Loop thru a customer list and go to their shhet and insert data

Threaded View

  1. #1
    Registered User
    Join Date
    03-18-2014
    Location
    MS, USA
    MS-Off Ver
    Excel 2007
    Posts
    1

    Loop thru a customer list and go to their shhet and insert data

    I have created a excel workbook in which I use for keeping up with storage unit rent. I have a tenant list sheet and each tenant has a sheet on which I keep up with charges and credits. What I want is a macro the will loop thru each tenants sheet based on tenant list and insert data and go to the next sheet. I found this on the web:
    Sub Macro21(control As IRibbonControl)
    Dim Sheet_Name As Range
    For Each Sheet_Name In Sheets("tenant list").Range("A:A")
        If Sheet_Name.Value = "" Then
            Exit For
        Else
         Sheets(Sheet_Name.Value).Select    This is where I get a run time error 9 subscript out of range
            
        Dim emptyrow As Long
    emptyrow = WorksheetFunction.CountA(Range("a:a")) + 8
    
    Cells(emptyrow, 1).Value = Date
    Cells(emptyrow, 2).Value = "Rent"
    Cells(emptyrow, 3).Value = Range("b15")
            
            End If
        Next Sheet_Name
    
    
        
    
    End Sub
    Any help with be greatly appreciated.
    Last edited by Leith Ross; 03-18-2014 at 09:38 PM. Reason: Added Code Tags

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Using Data Validation List to update customer address list
    By Rosco88 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-29-2014, 10:27 AM
  2. sorting a list of customer invoices from columns into rows / customer
    By jr1984 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-11-2011, 07:04 AM
  3. How can i insert customer data?
    By MIRMLE in forum Excel General
    Replies: 1
    Last Post: 01-22-2009, 02:53 AM
  4. Replies: 6
    Last Post: 11-07-2008, 01:19 PM
  5. [SOLVED] How To Make A Customer List With Extra Entries Per Customer
    By Minitman in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-31-2005, 03:43 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