Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Aug 2001
    Location
    Perth,(aka middle of nowhere), Western Australia, Australia
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    odd #value! (2000 SR1)

    Not sure if this should go here or the VBA board.
    I am getting a #value! result that I cannot understand from a user defined function.
    The function is designed to horizontally traverse a series of data (in the same sheet) using offset.
    It loops through the series according to the number of fee cycles that have occurred.

    From Period 28 (column 29 - AC) it starts returning #value! and despite debugging I cannot determine why. It seems to exit the while loop on the second pass but does not do this until period 28. Periods 1-27 are fine.

    I am baffled <img src=/S/hairout.gif border=0 alt=hairout width=31 height=23> as it worked up until I put a simple test in for period value (which works).

    The attached sheet isn't pretty - not meant to be - as it just to prove up the function.
    Any ideas.
    Attached Files Attached Files

  2. #2
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: odd #value! (2000 SR1)

    You have Dimmed ctr as an integer, whereas at 28 the value your function tries to assign is greater than 32767.
    Dim the variables as Long and you're OK.
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  3. #3
    Lounger
    Join Date
    Aug 2001
    Location
    Perth,(aka middle of nowhere), Western Australia, Australia
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: odd #value! (2000 SR1)

    <img src=/S/doh.gif border=0 alt=doh width=15 height=15> Doh! - I haven't run across the old integer size problem since my line basic days.
    Obvious error when I was looking for something complex.

    Thanks

Posting Permissions

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