+ Reply to Thread
Results 1 to 8 of 8

Averaging a user input defined range based on values in columns

  1. #1
    Registered User
    Join Date
    02-14-2014
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    28

    Averaging a user input defined range based on values in columns

    I am wanting to determine values such as Min, Max, Average, Ect. of a user inputted range.

    Column A
    Day
    1-Jan
    2-Jan
    3-Jan
    4-Jan
    5-Jan
    6-Jan

    Column B
    Average
    7.5
    8.4
    6.3
    7.9
    6.9
    6.8

    Column C
    Average High
    16.5
    18.1
    18.3
    17.2
    16.7
    15.8

    Column D
    Average Low
    -3.3
    -3.6
    -6.6
    -4.0
    -3.8
    -4.4

    These values are a 365 day summary of various temperatures. I have saved each 365-cell column into "Weather_Day", "Weather_Average_Temp", "Weather_Average_HTemp", "Weather_Average_LTemp"

    The idea is to allow for the following input:

    Start Date: "User Input"
    End Date: "User Input"

    After the user inputs the two dates, I want to return the max, ave, min, ect based on that range. i.e.

    Start Date: 1-Jan
    End Date: 3-Jan

    These inputs would then average (7.5, 8.4, 6.3) and return 7.4 to a pre-determined cell.

    I able able to index, match, sumproduct to locate specific values but can't get a "range" to automatically update based on user inputs.

    Suggestions?

    Thanks!
    Attached Images Attached Images
    Last edited by smit.etha; 02-14-2014 at 01:49 AM.

  2. #2
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Averaging a user input defined range based on values in columns

    I and other members cannot view pictures so it is always preferably to upload a real workbooks instead of pictures.
    maybe you could work with the formulas below.

    =AVERAGE(IF($A$1:$A$10>=ref for start date),IF($A$1:$A$10<=ref for end date,$B$1:$B$10))) -> ctrl + shift + enter not just enter

    for higher version which i think you don't have prior to your profile but just in case.
    =AVERAGEIFS(Sheet2!B:B,Sheet2!A:A,"<="&C3,Sheet2!A:A,">"&C4)
    C3 =start date
    C4 =end date
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  3. #3
    Registered User
    Join Date
    02-14-2014
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    28

    Re: Averaging a user input defined range based on values in columns

    Vladimir,

    Thanks for the tip on the image. I included a couple columns of info, are you able to assist given this new information?

    Thanks,

    Ethan

  4. #4
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Averaging a user input defined range based on values in columns

    ethan.xlsxlook at this with two options given in #2 post

  5. #5
    Registered User
    Join Date
    02-14-2014
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    28

    Re: Averaging a user input defined range based on values in columns

    Glorious, thank you very much!

  6. #6
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Averaging a user input defined range based on values in columns

    Your Welcome. Glad to help.
    You can mark this thread "Solved" if you have time.
    Tip:
    To Mark Solved.
    How?
    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

    Note:
    You can also thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given.
    By doing so you can add to the reputation(s) of those who helped and shared their time in helping you.

  7. #7
    Registered User
    Join Date
    02-14-2014
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    28

    Re: Averaging a user input defined range based on values in columns

    Vlad - One more question, I was hoping that the formula I received would allow me to just switch "Average()", "Min()", "Max()" and have it still work fine. Any suggestions on finding the min/max based on the date range?

    Thanks again,

    Ethan

  8. #8
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Averaging a user input defined range based on values in columns

    just change the average with min or max

    =MIN(IF((A1:A50>=I1)*(A1:A50<=I3),B1:B50)) -> ctrl+ shift + enter not just enter same with the max()

+ 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. Macro to insert one row into defined tabs based on user input
    By lexxasp1210 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-12-2013, 01:45 PM
  2. user defined macro to replace certain characters in a string based on user input
    By whatappears in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-17-2012, 06:25 PM
  3. How to get range for an User defined formula by using Input box
    By yogesh thakker in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-20-2010, 04:32 AM
  4. Automatically populate a list based on defined categories -- user input varies
    By NearClueless in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-12-2009, 06:05 PM
  5. Replies: 0
    Last Post: 02-24-2005, 04:06 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