Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Can anyone help me make the following code more effecient. I keep repeating
the same formulas, so I think there might be a much more effecient way of writing my code. [L3].Value = 975000 [L3].Select ActiveCell.Offset(0, 1).Select ActiveCell.FormulaR1C1 = _ "=SUMPRODUCT((R2C8:R65536C8=""BUY"")*(R2C4:R65536C 4=RC12)*(R2C4:R65536C4<R[-1]C12)*(R2C4:R65536C4<""""))" ActiveCell.Offset(0, 1).Select ActiveCell.FormulaR1C1 = _ "=SUMPRODUCT((R2C8:R65536C8=""SALE"")*(R2C4:R65536 C4=RC12)*(R2C4:R65536C4<R[-1]C12)*(R2C4:R65536C4<""""))" [L4].Value = 950000 [L4].Select ActiveCell.Offset(0, 1).Select ActiveCell.FormulaR1C1 = _ "=SUMPRODUCT((R2C8:R65536C8=""BUY"")*(R2C4:R65536C 4=RC12)*(R2C4:R65536C4<R[-1]C12)*(R2C4:R65536C4<""""))" ActiveCell.Offset(0, 1).Select ActiveCell.FormulaR1C1 = _ "=SUMPRODUCT((R2C8:R65536C8=""SALE"")*(R2C4:R65536 C4=RC12)*(R2C4:R65536C4<R[-1]C12)*(R2C4:R65536C4<""""))" [L5].Value = 925000 [L5].Select ActiveCell.Offset(0, 1).Select ActiveCell.FormulaR1C1 = _ "=SUMPRODUCT((R2C8:R65536C8=""BUY"")*(R2C4:R65536C 4=RC12)*(R2C4:R65536C4<R[-1]C12)*(R2C4:R65536C4<""""))" ActiveCell.Offset(0, 1).Select ActiveCell.FormulaR1C1 = _ "=SUMPRODUCT((R2C8:R65536C8=""SALE"")*(R2C4:R65536 C4=RC12)*(R2C4:R65536C4<R[-1]C12)*(R2C4:R65536C4<""""))" Any help would be appreciated. -- Regards, timmulla |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA: For Count, when count changes from cell to cell | Excel Discussion (Misc queries) | |||
Cell value not recognized by code. | Excel Discussion (Misc queries) | |||
Macro Help (Uppercase multiple ranges?) | Excel Discussion (Misc queries) | |||
Text formatting | Excel Worksheet Functions | |||
Macro for changing text to Proper Case | Excel Worksheet Functions |