Results 1 to 7 of 7
  1. #1
    2 Star Lounger
    Join Date
    May 2002
    Posts
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Datbase Functions (Excel 2003)

    Apropos my post yesterday. Attached is a different file but with the same errors for DAVERAGE. I've checked what you pointed out to me yesterday Hans and, there don't appear to be extra spaces and the spelling of the fields doesn't appear to differ. What am I missing. Thanks as usual for your help.
    Bob
    Attached Files Attached Files

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Datbase Functions (Excel 2003)

    You should really check more carefully. It's exactly the same problem - there is a space after "Gender" in cell D7.

  3. #3
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Datbase Functions (Excel 2003)

    There is a space behind the field heading Gender in cell D7. Double click on the cell, and delete the space. The formula works after that!
    Regards,
    Rudi

  4. #4
    3 Star Lounger
    Join Date
    Nov 2005
    Location
    Asia Pacific, Bangkok Metropolis
    Posts
    378
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Datbase Functions (Excel 2003)

    Hi Rudi,

    A dump question to ask, but how do you identify the spaces?

    cheers, fy
    Hope this is helpful

    francis, <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

    My Reading

    Pivot Table 101
    Pivot Table
    Array

  5. #5
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Datbase Functions (Excel 2003)

    Nothing special really. The syntax of the DAVERAGE function was perfectly correct, so the error had to be in the logic, (or human factor). I selected cell D7, the field heading, and pressed F2 to switch into cell edit mode. The cursor is added to the end of the cell entry, and I could immediately see that there was a space after the word.

    If one requires the need to check many entries for a trailing space, then you could use this formula:
    =IF(RIGHT(A7,1)=CHAR(32),TRUE,FALSE)
    It returns true if the first character on the right of a cell entry equals a space (char(32)).
    Regards,
    Rudi

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Datbase Functions (Excel 2003)

    You can simplify the formula
    <code>
    =IF(RIGHT(A7,1)=CHAR(32),TRUE,FALSE)
    </code>
    to
    <code>
    =RIGHT(A7,1)=" "
    </code>
    The result of a comparison is TRUE or FALSE.

  7. #7
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Datbase Functions (Excel 2003)

    Of course... TX

    I use comparisons like this often for conditional formatting and validation. Its typical to not think straight if you use things in a different context.
    Regards,
    Rudi

Posting Permissions

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