+ Reply to Thread
Results 1 to 7 of 7

Thread: Excel 2007 Functions

  1. #1
    Registered User
    Join Date
    06-17-2010
    Location
    London, England.
    MS-Off Ver
    Excel 2003, Excel 2007
    Posts
    2

    Excel 2007 Functions

    Hi. I'm new here.

    Anyone got any experience of Excel 2003 functions not working in Excel 2007?

    I'm referring to VB functions, which have worked fine for years in XL2003. In XL2007 endless errors appear in the worksheets. Saving the workbook as .xlsm in XL2007 makes no difference.

    The functions work fine in the .xls workbook providing the PC's had Excel 2003 installed on it in the past, and an upgrade to Excel 2007. But if the PCs had a fresh Windows/Excel 2007 build on it, the functions I'm using give errors. I'm not keen on a workaround/rewrite, as the file's 71mb, and has many worksheets and formulae - all of which would need double-checking. Microsoft don't appear to have anything on their site to help.

    Thanks in anticipation.

  2. #2
    Forum Guru, retired Admin royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    25,640

    Re: Excel 2007 Functions

    What Functions do you mean?
    Hope that helps.

    RoyUK
    --------
    If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need

    For Excel Tips & Solutions, free examples and tutorials why not check out my downloads

    New members please read & follow the Forum Rules

    Remember to mark your questions Solved and rate the answer(s)

  3. #3
    Registered User
    Join Date
    06-17-2010
    Location
    London, England.
    MS-Off Ver
    Excel 2003, Excel 2007
    Posts
    2

    Re: Excel 2007 Functions

    Here's the Function - not written or altered by me so far. As I've said, it's run great for years in various previous versions of Excel, but now won't work on a PC that hasn't previously had Excel 2003 on it. It won't run in Excel 2007. It won't recognise CalcDate.

    Again, thanks in anticipation.


    Function nrqtr(reviewdate)
        'converts dates to nearest English quarter day
        calcdate = DateSerial(1900, Month(reviewdate), Day(reviewdate))
        If calcdate >= 1 And calcdate <= 40 Then
        nrqtr = DateSerial(Year(reviewdate) - 1, 12, 25)
        ElseIf calcdate >= 41 And calcdate <= 130 Then
        nrqtr = DateSerial(Year(reviewdate), 3, 25)
        ElseIf calcdate >= 131 And calcdate <= 224 Then
        nrqtr = DateSerial(Year(reviewdate), 6, 24)
        ElseIf calcdate >= 225 And calcdate <= 316 Then
        nrqtr = DateSerial(Year(reviewdate), 9, 29)
        Else: nrqtr = DateSerial(Year(reviewdate), 12, 25)
        End If
    End Function
    (Thx Shg, updated with tags.)
    Last edited by RickyT; 06-18-2010 at 01:12 AM.

  4. #4
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2007, 2010
    Posts
    25,777

    Re: Excel 2007 Functions

    Ricky, please take a few minutes to read the forum rules, and then edit your post to add CODE tags.
    Microsoft MVP - Excel
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Forum Guru Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    MS Excel 2010
    Posts
    2,252

    Re: Excel 2007 Functions

    Works fine for me in Excel 2007, although I'll admit I have no idea what it is supposedc to do.

  6. #6
    Forum Guru Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    MS Excel 2010
    Posts
    2,252

    Re: Excel 2007 Functions

    OK he has added code tags so you can undelete my post now!

  7. #7
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2007, 2010
    Posts
    25,777

    Re: Excel 2007 Functions

    Ditto. Perhaps the VBE is set to require variable declaration, so declare calcdate, which would be good practice anyway.
    Microsoft MVP - Excel
    Entia non sunt multiplicanda sine necessitate

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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.2.0