Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I think this is what you need
ActiveWorkbook.Sheets("Sheet1").Cells(i, 3).Value = _ ActiveWorkbook.Sheets("Sheet1").Cells(i, 1) / _ Application.SumIf(ActiveWorkbook.Sheets("Sheet1"). Columns(2), _ "<" & XXX, ActiveWorkbook.Sheets("Sheet1").Columns(1)) The < is a string and XXX is a variable which is a number. The & combines a strinhg and a number and makes the results a string. "Arturo" wrote: ActiveWorkbook.Sheets("Sheet1").Cells(i, 3).Value = _ ActiveWorkbook.Sheets("Sheet1").Cells(i, 1) / _ Application.SumIf(ActiveWorkbook.Sheets("Sheet1"). Columns(2), _ "<XXX", ActiveWorkbook.Sheets("Sheet1").Columns(1)) The above code works but, the problem Im encountering has to do with factoring in a number associated with a variable, X, into the denominator of this formula. X resides elsewhere, I can pull it with no problem. Whatever SumIf of column 1 is, I want to add X to that summation but am not finding the correct syntax to do so. Any direction would be appreciated. Arturo |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Limitations on Sumif Calculation | Excel Worksheet Functions | |||
Help to create calculation with code | Excel Programming | |||
Calculation on SUMIF Results | Excel Worksheet Functions | |||
SUMIF function in "Price quote with tax calculation" templae | Excel Worksheet Functions | |||
Code Calculation Problem | Excel Programming |