+ Reply to Thread
Results 1 to 4 of 4

average of cells from user selected range of worksheets

  1. #1
    Forum Contributor
    Join Date
    11-09-2007
    Location
    USA
    MS-Off Ver
    2003
    Posts
    141

    average of cells from user selected range of worksheets

    Hi, I am going to give an example the best I can.

    I have Sheet1-Sheet10. Cell A10 on all sheets contains a number. I have a seprate worksheet I refer to as "averages" I have a macro like this thus far that works so far:
    Please Login or Register  to view this content.
    I would like to be able to create an input box or drop down box to select any worksheets at random and only get back the average of those selected. An example would be I would tell excel somehow to look at Sheet2-Sheet7 and give me the average of A10. Next time I would ask for the average from Sheet1-Sheet8. Thanks for looking!

  2. #2
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650
    Hi, Have a look at the attached file see if its any good to you.
    NB:- Hold down "Ctrl" to select non continuous sheets.
    Regards Mick
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    11-09-2007
    Location
    USA
    MS-Off Ver
    2003
    Posts
    141
    That works as is. Its part of my solution. The other thing I am looking for is to have the list populate from a seperate workbook and populate the list via the worksheets included in the second workbook. Thanks for helping.

  4. #4
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650
    Hi If you mean from the active workbook Fill the "list Box" of sheet names from a second workbook and then find the average of the selected sheets range "A10" from the second sheet. Try this
    You will have to alter the second sheet name (shown in the code as test.xls)in the "Userform Initalize" code and the "Command Button" on the Userform.
    The second workbook is required to be open for the code to work.
    Regards Mick
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Link to a range of cells on another worksheet
    By JaeRae1133 in forum Excel General
    Replies: 8
    Last Post: 11-25-2014, 12:47 AM
  2. Filling in cells with user selected data
    By Raggy in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-29-2008, 04:52 PM
  3. Manual calculating selected cells only
    By pauldaddyadams in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-11-2008, 04:05 AM
  4. Compare user input with range (with an if statement)
    By HBF in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-24-2008, 11:35 AM
  5. Allow entry into selected cells
    By SOCMentor in forum Excel General
    Replies: 1
    Last Post: 10-02-2006, 04:02 PM

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.6.0 RC 1