Results 1 to 20 of 21

Thread: Sleeper: Summing based on numberformat

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Mentor
    Joined
    Jun 2005
    Posts
    374
    Location

    Sleeper: Summing based on numberformat

    hello
    i have a table in which rows contains cell with different numberformats - #,##0.00 or 0.00% i built this vba function called server.
    i want the function to sum only cells with numberformat-#,##0.00
    whats wrong?

    Function server(r As Range) 
    Dim cell As Range
    Dim i As Integer
    For Each cell In Selection
    If cell.NumberFormat = "#,##0.00" Then
    i = cell.Value + 1
    Else: Exit Function
    i = server
    End If
    Next
    End Function
    thanks
    Last edited by johnske; 06-25-2005 at 02:59 PM. Reason: to add VBA tags
    moshe

Posting Permissions

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