+ Reply to Thread
Results 1 to 2 of 2

Create Function like Sum()

  1. #1
    Yap Michael
    Guest

    Create Function like Sum()

    Dear All,

    Has anyone ever create function like sum() which have parameter in
    range? What's parameter type should be used?

    Thanks for the help

  2. #2
    Tom Ogilvy
    Guest

    Re: Create Function like Sum()

    Public Function MySum(rng as Range) as Double
    Dim tot as Double
    Dim cell as Range
    for each cell in rng
    if isnumeric(cell) then
    tot = tot + cell.Value
    end if
    MySum = Tot
    End Function

    Would be a simple implementation. The correct answer depends on exactly
    what you want the function to be able to do.



    --
    Regards,
    Tom Ogilvy



    "Yap Michael" <yapmichael2000@gmail.com> wrote in message
    news:%23fpFmI$FGHA.344@TK2MSFTNGP11.phx.gbl...
    > Dear All,
    >
    > Has anyone ever create function like sum() which have parameter in
    > range? What's parameter type should be used?
    >
    > Thanks for the help




+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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