Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
excel 2000
Can Excel be used to write a program that evaluates a list
of variables and controls the order of computations by utilizing "IF ___, THEN ___, ELSE ___" and "GO TO ___" statements. If so, how? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
excel 2000
Al
Here's one way Sub TestCalc() Dim data1 As Range, data2 As Range Dim TestVar Dim result As Double TestVar = Range("B1") Set data1 = Range("A4:A7") Set data2 = Range("B4:B7") If TestVar 50 Then result = Application.WorksheetFunction.Sum(data1) Else: result = Application.WorksheetFunction.Sum(data2) End If Range("B9").Value = result End Sub Regards Peter -----Original Message----- Can Excel be used to write a program that evaluates a list of variables and controls the order of computations by utilizing "IF ___, THEN ___, ELSE ___" and "GO TO ___" statements. If so, how? . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Open 2000 file attachments in Excel 2000 | Excel Discussion (Misc queries) | |||
I cannot edit cell format in Excel 2000 (Part of office 2000)! | Excel Discussion (Misc queries) | |||
Using Excel 2000 as Data source for Word 2000 document | Excel Discussion (Misc queries) | |||
Hyperlink in Excel 2000 can't open bookmarked Word 2000 file | Excel Discussion (Misc queries) | |||
Excel Programs developed in Office 2000 on Windows 2000 | Excel Discussion (Misc queries) |