Results 1 to 2 of 2
  1. #1
    Jerseynjphillypa is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Apr 2012
    Posts
    83

    Calculate the Average

    I have this formula I run in Excel once my database is finish running in Access



    =AVERAGEIF(Item,B2,Total)

    I was wondering If I can do the same thing in Access

    I have a filed (Header) called Item and I just select the range in the Name Manager section so i don't have to select every cell

    Then B2 is where I get the name of the cell in that row. I also attached an example
    Attached Files Attached Files

  2. #2
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Hi -

    Well, yes and no - but mostly no. Can you do it the same way as Excel does? No. When Access displays data, even in datasheet view, it does not know anything about data other than the row which the cursor is on. There is no concept of a "range", of referring to a "cell" in another row. The same is true for recordsets in VBA - you can refer only to the set member you are currently "on".

    You would have to write a VBA routine to do what you want to do.

    John

Please reply to this thread with any new information or opinions.

Similar Threads

  1. help me get the average please! :(
    By joebox8 in forum Access
    Replies: 3
    Last Post: 07-13-2011, 08:31 AM
  2. Average help please
    By C90RanMan in forum Programming
    Replies: 1
    Last Post: 08-01-2010, 12:14 PM
  3. Replies: 13
    Last Post: 05-28-2010, 11:57 AM
  4. Calculate average in a query
    By srbooth in forum Queries
    Replies: 1
    Last Post: 02-20-2010, 09:41 AM
  5. Conditioned Average
    By BravoEcho in forum Queries
    Replies: 1
    Last Post: 06-17-2009, 09:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums