LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default error in programme

the programme i wrote is to return the maximum, minimum and average
of
100 numbers. But it keeps returning an error. Does anyone no whats
wrong with it? what its missing?
cheers

Sub testing()
Dim a(10) As Single, max As Single
Dim min As Single, sum As Single
Dim Average As Integer, i As Integer
n = 100
max = a(1)
min = a(1)
sum = a(1)
For i = 1 To 100
If max a(i) Then max = a(i)
If min < a(i) Then
min = a(i)
End If
sum = sum + a(i)
Next i
Average = sum / n
End Sub

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error message Microsoft Graph is part of another programme Alimyb Setting up and Configuration of Excel 0 August 14th 06 11:28 AM
Salary programme Suresh Lohar Excel Discussion (Misc queries) 1 April 3rd 06 07:57 PM
Referencing other programme GBH99 Setting up and Configuration of Excel 1 February 28th 06 10:06 PM
Linking with other programme Rao Ratan Singh New Users to Excel 1 January 31st 06 07:16 PM
Can't access programme hol015 Excel Discussion (Misc queries) 1 August 1st 05 01:14 AM


All times are GMT +1. The time now is 05:31 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"