Bruce Kieffer Posted February 3, 2021 Share Posted February 3, 2021 I see min and max as worksheet spreadsheet functions, is there a median function? Quote Link to comment
Pat Stanford Posted February 3, 2021 Share Posted February 3, 2021 No media function in worksheets or even in Vectorscript as far as I know. Quote Link to comment
Peter Vandewalle Posted February 3, 2021 Share Posted February 3, 2021 Should be scriptable. I’m not sure the non-fixed number of parameters would be an issue. Knowing that every value will be considered a parameter in the script. Quote Link to comment
Bruce Kieffer Posted February 3, 2021 Author Share Posted February 3, 2021 1 hour ago, Peter Vandewalle said: Should be scriptable. I’m not sure the non-fixed number of parameters would be an issue. Knowing that every value will be considered a parameter in the script. I have three parameters, and it's possible that some of the three may be the same value. I think that could be a problem. Quote Link to comment
Peter Vandewalle Posted February 3, 2021 Share Posted February 3, 2021 21 minutes ago, Bruce Kieffer said: I have three parameters, and it's possible that some of the three may be the same value. I think that could be a problem. That shouldn’t be a problem. just sort the list and take the middle value if the list length is odd. Take the average of the 2 middle values if the list length is even. Will the data come from a region of cells? Or will it just be input in the formula? If your goal is to get the median from a database row calculation, you might try to put the worksheet script outside database header and point to the database rows. Worth trying. Quote Link to comment
Bruce Kieffer Posted February 3, 2021 Author Share Posted February 3, 2021 1 hour ago, Peter Vandewalle said: That shouldn’t be a problem. just sort the list and take the middle value if the list length is odd. Take the average of the 2 middle values if the list length is even. Will the data come from a region of cells? Or will it just be input in the formula? If your goal is to get the median from a database row calculation, you might try to put the worksheet script outside database header and point to the database rows. Worth trying. I'm trying something like that, but I trying to use a formula to choose which is the median value. So far no luck with a formula. Quote Link to comment
Pat Stanford Posted February 3, 2021 Share Posted February 3, 2021 It is certainly scriptable, I just meant that there is no function for returning the value built in. If you only have three numbers then the median is Sum(3 values)-Min-Max. This does not care if two of the values are the same. It really depends on what you use of the median value is if this algorithm works for you or not. Quote Link to comment
Peter Vandewalle Posted February 3, 2021 Share Posted February 3, 2021 Can you share your Vectorworks file? Quote Link to comment
Bruce Kieffer Posted February 4, 2021 Author Share Posted February 4, 2021 2 hours ago, Peter Vandewalle said: Can you share your Vectorworks file? This is related to my Material Cut List question. I posted a file there. I will update that file with the worksheet I am creating and then post it here. Quote Link to comment
Bruce Kieffer Posted February 4, 2021 Author Share Posted February 4, 2021 File is attached. The T x W x L worksheet has a start of a spreadsheet trying to find the min, median, and max of the thickness, width, and length's of the parts. Need A Cutting List.vwx Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.