Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Other Programming > VBScript
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
VBScript For questions and discussions related to VBScript.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VBScript section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 16th, 2003, 12:02 PM
Authorized User
 
Join Date: Oct 2003
Location: , , .
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to calculate median value

Hi All,

I have 4 numbers (84, 88, 91, and 93) and trying to get the median value.

I know which numbers I need to get but I am having hard time to sort them. (Median value = 88+91/2)

Any help is welcome...

-Thanks

Reply With Quote
  #2 (permalink)  
Old December 16th, 2003, 12:06 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

VBS has no built-in sort functions. If you can use JScript instead it has a built-in sort() for arrays.

Otherwise here's a useful link to sorting algorithms coded in VB:
http://www.vb-helper.com/tut1.htm

hth
Phil
Reply With Quote
  #3 (permalink)  
Old December 17th, 2003, 03:54 PM
Authorized User
 
Join Date: Oct 2003
Location: , , .
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you Phil, I used the link...

I sorted the numbers and calculated the median..

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculate time divovsky Access 2 March 15th, 2007 03:10 PM
how to calculate bandwidth debuajm C# 2005 0 January 16th, 2007 07:40 AM
Calculate ivangr Visual Basic 2005 Basics 0 April 9th, 2006 04:39 AM
calculate 2 textboxes chriskhan2000 BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 2 December 1st, 2005 09:11 PM
Help me How to calculate minhtri VB How-To 4 June 8th, 2004 04:06 PM



All times are GMT -4. The time now is 05:46 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.