Results 1 to 4 of 4
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Custom Function Similar to SUM (XP; SP3)

    I am having an issue with creating a custom function similar to "=SUM(A1:A25)". What I would like to achieve is declare the range within a function. I know the column, first and last row. So something like: "=SUM(MyRange)".

    I have not had any success.

    Thanks,
    John

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Custom Function Similar to SUM (XP; SP3)

    I'm sorry, I don't understand your question. Would you try to explain it again? Are you trying to write a User Defined Function in VBA? If so, show us the code. Tell us what is not working. What is "=SUM(MyRange)"? Are you trying to use the Excel SUM function to sum a range named MyRange? If so, what is not working?
    Legare Coleman

  3. #3
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Custom Function Similar to SUM (XP; SP3)

    Why do you need a custom function?

    Sum will work with a named range as it is.

    Steve

  4. #4
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Custom Function Similar to SUM (XP; SP3)

    I was playing around with "getting the last used cell in a column" function and I got stuck with one concept. After giving it some thought (walked away from it) my post didn't make any sense. Anyway a dynamic range will do the trick.

    If someone is interested here is the "function-GetLastUsedCell"

    Thanks,
    John

Posting Permissions

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