Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / April 2007

Tip: Looking for answers? Try searching our database.

Poor Dumb Teacher Needs a Little Help

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
emvpix - 20 Apr 2007 16:42 GMT
I need to generate a list of numbers that fall within a certain range based
on a "base" percentage. I am generating a sample gradebook. Student "A" has a
semester grade of 83%. I need to generate a list of 24 "assignments" that
would average out to that 83% semester grade -- the student would get a few
95%; a couple of 70%; but the average would be 83 (or some given number) I am
certain there is an easy way to do this in excel . . .
Bernie Deitrick - 20 Apr 2007 17:10 GMT
Simple would be to use =RandBetween(desired average + 10, desired average -10) in each of the 24
assignement grades.

For example,

=RANDBETWEEN(73,93)

The numbers could be in cells that are referenced:

=RANDBETWEEN($A2,$B2)

HTH,
Bernie
MS Excel MVP

>I need to generate a list of numbers that fall within a certain range based
> on a "base" percentage. I am generating a sample gradebook. Student "A" has a
> semester grade of 83%. I need to generate a list of 24 "assignments" that
> would average out to that 83% semester grade -- the student would get a few
> 95%; a couple of 70%; but the average would be 83 (or some given number) I am
> certain there is an easy way to do this in excel . . .
Jim Cone - 20 Apr 2007 17:48 GMT
Sub FindNumbersThatAverage()
' Provides random numbers that average a predetermined amount.
' Jim Cone - San Francisco, USA - May 29, 2005
Dim lngN As Long
Dim lngLow As Long
Dim lngTemp As Long
Dim lngHigh As Long
Dim lngTarget As Long
Dim lngQuantity As Long
Dim lngArray() As Long

'Establish parameters...       '<<<<<
lngLow = 70
lngHigh = 100
lngTarget = 83
lngQuantity = 24

'Sanity check
If lngLow > lngTarget Or lngHigh < lngTarget Then
Exit Sub
End If
'The number of numbers must be an even number <g>
If Not lngQuantity Mod 2 = 0 Then
lngQuantity = lngQuantity + 1
End If

ReDim lngArray(1 To lngQuantity)

For lngN = 1 To lngQuantity Step 2
'Get random values between the high and low parameters.
Randomize lngTemp
lngTemp = Int(Rnd * (lngHigh - lngLow + 1)) + lngLow

'Assign random values
lngArray(lngN) = lngTemp
lngArray(lngN + 1) = 2 * lngTarget - lngTemp

'If the high/low range is not centered on the target average
'then the random results may need adjusting.
If lngArray(lngN + 1) > lngHigh Then
lngArray(lngN) = 2 * lngTarget - lngHigh + lngN
lngArray(lngN + 1) = lngHigh - lngN
End If
If lngArray(lngN + 1) < lngLow Then
lngArray(lngN) = 2 * lngTarget - lngLow - lngN
lngArray(lngN + 1) = lngLow + lngN
End If
Next 'lngN

'Stick it on the worksheet.
Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Resize(1, lngQuantity).Value = lngArray()
End Sub
Signature

Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware

"emvpix"
<emvpix@discussions.microsoft.com>
wrote in message
I need to generate a list of numbers that fall within a certain range based
on a "base" percentage. I am generating a sample gradebook. Student "A" has a
semester grade of 83%. I need to generate a list of 24 "assignments" that
would average out to that 83% semester grade -- the student would get a few
95%; a couple of 70%; but the average would be 83 (or some given number) I am
certain there is an easy way to do this in excel . . .

Dana DeLouis - 20 Apr 2007 18:47 GMT
> certain there is an easy way to do this in excel . . .

One of a few ways...
Under Data Analysis, one can select "Random Number Generation."
Select a "Normal" distribution, and set a mean (83%), and a Standard
deviation of your choice.
Takes about 2 seconds in Excel 2003, and over 1 hour in Excel 2007.  That's
how long it took me to find it.  Excel 2007 is simply the worst program I
have ever seen.
Signature

HTH   :>)
Dana DeLouis
Windows XP & Office 2007

>I need to generate a list of numbers that fall within a certain range based
> on a "base" percentage. I am generating a sample gradebook. Student "A"
[quoted text clipped - 5 lines]
> am
> certain there is an easy way to do this in excel . . .
Jim Cone - 20 Apr 2007 19:19 GMT
Dana,
re:  "Excel 2007 is simply the worst program I have ever seen."

I see in the news today that Dell has started offering Windows XP as
the operating system on six laptop/desktop units instead of Vista.
http://www.computerworld.com/action/article.do?command=viewArticleBasic&articleI
d=9017339&intsrc=news_ts_head


Maybe there is hope that a "classic" version of Office 2007 is being held
in reserve by Microsoft?
Signature

Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware

"Dana DeLouis" <ddelouis@bellsouth.net>
wrote in message

> certain there is an easy way to do this in excel . . .

One of a few ways...
Under Data Analysis, one can select "Random Number Generation."
Select a "Normal" distribution, and set a mean (83%), and a Standard
deviation of your choice.
Takes about 2 seconds in Excel 2003, and over 1 hour in Excel 2007.  That's
how long it took me to find it.  Excel 2007 is simply the worst program I
have ever seen.
Signature

HTH   :>)
Dana DeLouis
Windows XP & Office 2007

Duke Carey - 20 Apr 2007 19:38 GMT
Or maybe at least a 'fix' that will allow us to move worthless junk off the
ribbon and put meaningful commands there.

>  
> Dana,
[quoted text clipped - 15 lines]
> how long it took me to find it.  Excel 2007 is simply the worst program I
> have ever seen.
Dana DeLouis - 20 Apr 2007 19:52 GMT
Maybe it is just me, but it takes me 100 times longer to do anything w/
2007.
Don't even get me started on the Help system.  All the links, Methods, &
Properties were removed in 2007.
Some of the wording of some function still refers to them, but they are not
there.
I have to spend a lot of time turning on another computer that has Excel
2003 just to read the help files.  The list goes on ...
The op's question finally made me determined to find that Analysis Tookpak
that was supposedly built-in according to some help files that I've read in
the past.

Signature

Dana DeLouis

> Or maybe at least a 'fix' that will allow us to move worthless junk off
> the
[quoted text clipped - 19 lines]
>> how long it took me to find it.  Excel 2007 is simply the worst program I
>> have ever seen.
Mike Middleton - 21 Apr 2007 01:24 GMT
Dana  -

You wrote: > The op's question finally made me determined to find that
Analysis Tookpak that was supposedly built-in according to some help files
that I've read in the past. <

The worksheet functions of the Analysis ToolPak are built into Excel 2007.

The Data Analysis tools still require installing the add-in, and the feature
then appears on Excel 2007's Data ribbon.

-  Mike

> Maybe it is just me, but it takes me 100 times longer to do anything w/
> 2007.
[quoted text clipped - 33 lines]
>>> I
>>> have ever seen.
Harlan Grove - 20 Apr 2007 21:44 GMT
"Jim Cone" <jim.cone...@rcn.comXXX> wrote...
...
>I see in the news today that Dell has started offering Windows XP as
>the operating system on six laptop/desktop units instead of Vista.
...
>Maybe there is hope that a "classic" version of Office 2007 is being held
>in reserve by Microsoft?
...

Not too likely. Coke had Pepsi, RC and store brands to keep them
honest. Microsoft lacks competitors.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.