LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Syntax problems

The help is being particularly unhelpful: I am a very inexperienced
programmer who's not worked with VB before, and I'm trying to use it to do a
stat function which I can't do any other way. essentially my code is he

Sub StatVariance()
Worksheets("Sheet5").Cell(4, 1).Value = 3
Sum = 0
Count = 1
Dim bign As Integer
bign = Sheets("Sheet3").Cells(58, 4)
Worksheets("Sheet5").Cell(2, 2).Value = bign
Dim n As Integer
n = Sheets("Sheet1").Cells(1, 6)
Worksheets("Sheet5").Cell(1, 2).Value = n
For j = 2 To Value = Worksheets("Sheet3").Cells(61, 5)
For i = 1 To j
Worksheets("Sheet5").Cell(3, (Count + 1)).Value = Sum
Ni = 2
Nj = 2
Sum = Sum + (WorksheetFunction.Combin((bign - Ni - Nj), n) /
WorksheetFunction.Combin(bign, n))
Count = Count + 1
Next i
Next j
Worksheets("Sheet1").Cell(2, 7).Value = Sum * 2
End Sub

what's wrong with it? what I'm trying to do is a sum of sums, that bit
should be fine, it's the introductory syntax I'm struggling with: how to
define a variable and set it to 0, and I'm not sure how to even tell it that
it's a program and should run when someone changes the contents of a cell,
for example.

 
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
aauugghhh...#div/o problems & various average formula problems acbel40 Excel Worksheet Functions 5 October 19th 09 05:00 PM
Indirect and Sumif Syntax Problems [email protected] Excel Discussion (Misc queries) 3 August 4th 06 01:59 AM
copy and paste between xls file syntax problems dr chuck Excel Programming 1 July 26th 06 05:55 AM
Problems merging an excel file due to code or file problems? Cindy M -WordMVP- Excel Programming 0 September 14th 04 02:58 PM


All times are GMT +1. The time now is 08:05 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"