Results 1 to 5 of 5

Custom function slowing workbook speed

Threaded View

  1. #1
    Registered User
    Join Date
    11-08-2005
    Posts
    8

    Custom function slowing workbook speed

    I have at work an excel file I use for billing purposes. It contains at least 100 seperate sheets, each named by the job number (we are a pump service company). I have posted things before about this problem and I hope this will not get me in trouble but I am still having the same problem...I am trying again and this time giving as much information as I can so hopefully this time is easier to fully understand my issue. I am enclosing an attatchment. This is an example of just one job out of 100 in the same workbook. On top of things I am new at forums and limited in my excel programming abilities. Please don't kick me off the forum for not asking my question right the first time.

    Anyway I have code written as of now into a Module 2 as follows:
    Function ColorAndName(ColRng As Range, NameRng As Range, Nme As String, coloffset As Integer)
      Application.Volatile
      lcolor = ColRng.Interior.ColorIndex
      total = 0
      For Each ce In NameRng
        If ce.Interior.ColorIndex = lcolor And ce.Value = Nme Then
          total = total + ce.Offset(0, coloffset)
        End If
      Next ce
      ColorAndName = total
    End Function
    Module 1 contains a macro I have written (with help) to hide rows I don't need to see once I am ready to print:
    Sub HideRows()
        Application.ScreenUpdating = False
        With Range("P1:P307")
            .Rows.Hidden = False
            .SpecialCells(xlCellTypeFormulas, xlLogical).Rows.Hidden = True
              End With
    End Sub
    My problems are:
    1) I work in this workbook every day doing data entry...when I am just entering data I do not need it to calculate every time I enter a number as it does now. It extremely slows down entering data so I end up going into Module 2 and temporarily deleting its code so I can enter data faster.

    2) I really don't need Module 2 to work for me until the job is done and I have entered all the guys time for all the days they worked on that job. I thought maybe I could convert it into a macro so I could tell it to run when I was ready - but I am a novice at this so that probably isn't the answer.

    If someone could take the time to help me it would be SO APPRECIATED!!!
    Attached Files Attached Files
    Last edited by VBA Noob; 09-04-2008 at 04:39 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Custom toolbar inserts in every workbook on server
    By Duddles in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-09-2008, 11:40 PM
  2. Create custom function to exceed 7 nested If functions in Excel 2003/XP/2000/97
    By seanyeap in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-30-2008, 08:54 AM
  3. Link together different cells in specific order?
    By Sandman4432 in forum Excel Formulas & Functions
    Replies: 19
    Last Post: 01-03-2008, 05:01 AM
  4. worksheet.countif function from outside workbook
    By snakeye in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-25-2006, 10:45 AM
  5. Excel maro macro to look up a closed excel function workbook.
    By hittingtime in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-23-2006, 10:00 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