Results 1 to 5 of 5

Go through all worksheets not functioning

Threaded View

  1. #1
    Registered User
    Join Date
    10-03-2014
    Location
    London, UK
    MS-Off Ver
    Windows 7
    Posts
    3

    Go through all worksheets not functioning

    Hey guys, I'm trying to pull some averages from worksheets that are all formatted the same way. When I run the following I get the
    "September
    August
    Past 12 Months" table at the bottom of the first worksheet (where I put the control button), but nothing on the other pages... Any idea why?

    Private Sub CommandButton1_Click()
    Dim ws As Worksheet
    Dim i As Integer
    Dim j As Integer
    
    
    For Each ws In ActiveWorkbook.Worksheets
    
    ws.Activate
    
    Cells(383, 1).Value = "September"
    Cells(384, 1).Value = "August"
    Cells(385, 1).Value = "Past 12 Months"
    
    
    
    j = 2
    
    For i = 1 To 50
    
    If Cells(7, i).Value = "Score" Or Cells(7, i).Value = "Attention" Then
    Cells(382, j).Value = Cells(6, i).Value
    Cells(383, j).Value = Application.Average(Range(Cells(373, i), Cells(344, i)))
    Cells(384, j).Value = Application.Average(Range(Cells(343, i), Cells(313, i)))
    Cells(385, j).Value = Application.Average(Range(Cells(373, i), Cells(9, i)))
    j = j + 1
    End If
    
    Next i
    
    Next ws
    
    End Sub

    Thanks a lot,

    C
    Last edited by clevot; 10-07-2014 at 04:54 AM. Reason: code tags forgotten

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Zero Functioning
    By vjharry in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-23-2013, 04:20 AM
  2. [SOLVED] Non Functioning HyperLinks
    By alansidman in forum Excel General
    Replies: 1
    Last Post: 11-05-2012, 01:54 PM
  3. [SOLVED] Enter Key Functioning Like Tab Key
    By imauld in forum Excel General
    Replies: 1
    Last Post: 05-18-2012, 01:12 PM
  4. sumif....&row (not functioning)
    By jw01 in forum Excel General
    Replies: 2
    Last Post: 02-15-2011, 12:00 PM
  5. [SOLVED] excel not functioning
    By TUNGANA KURMA RAJU in forum Excel General
    Replies: 1
    Last Post: 10-13-2005, 03:05 AM

Tags for this Thread

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