Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
if you want to do something like this in a worksheet
assume A1:A4 have 0 or 1 assume B1:B4 have numeric entries =sumproduct(A1:A4,B1:B4) -- Regards, Tom Ogilvy Wstohler wrote in message ... I have 4 variables with value of either 0 or 1 - Var1, Var2, Var3, Var4 I have 4 cells that correspond to those variables - "Cell1", "Cell2", "Cell3", "Cell4" And I have a total cell - "Total" I am trying to set the formula of "Total" to add all cells that the variable is 1. e.g. If Var1, Var3 and Var4 are equal to 1 then Range("Total").Value = "=Cell1+Cell3+Cell4" But I don't know how to work the IF statement into setting the formula. Any Ideas? (Besides writing a whole lot of nested IF statements) Thanks, Wes |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Setting Up a Series of Formulas | Excel Worksheet Functions | |||
Setting formulas for entire columns ... | Excel Discussion (Misc queries) | |||
Setting original Formulas for copying | Excel Discussion (Misc queries) | |||
Setting Conditional Formatting | Excel Worksheet Functions | |||
Problem setting up formulas | New Users to Excel |