Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() All I need to do is code in vba the following formula: =sum(d2*e2) and have the total in column f. The formula then i copied down the column with the row changes. for example =sum(d3*e3 and so on. I know this is simple but I can't seem to get it right s it goes down the column. Thank you for any help you can give me -- pcscs ----------------------------------------------------------------------- pcscsr's Profile: http://www.excelforum.com/member.php...fo&userid=1200 View this thread: http://www.excelforum.com/showthread.php?threadid=27604 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi, Why don't you try recording a macro and seeing the code that i generated? It will clarify a lot of questions. Regards, Ra -- routera ----------------------------------------------------------------------- routeram's Profile: http://www.excelforum.com/member.php...fo&userid=1045 View this thread: http://www.excelforum.com/showthread.php?threadid=27604 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
this idea should help
Sub balance() Set frng = Range("h8:h" & Range("a65536").End(xlUp).Row) With frng .Formula = "=sum(d2*e2)" ' .Formula = .Value'changes the formula to a value only End With End Sub -- Don Guillett SalesAid Software "pcscsr" wrote in message ... All I need to do is code in vba the following formula: =sum(d2*e2) and have the total in column f. The formula then is copied down the column with the row changes. for example =sum(d3*e3) and so on. I know this is simple but I can't seem to get it right so it goes down the column. Thank you for any help you can give me. -- pcscsr ------------------------------------------------------------------------ pcscsr's Profile: http://www.excelforum.com/member.php...o&userid=12006 View this thread: http://www.excelforum.com/showthread...hreadid=276049 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One more way based on the last row in column D:
Option Explicit Sub testme01() Dim myRng As Range With ActiveSheet Set myRng = .Range("F2:F" & .Cells(.Rows.Count, "D").End(xlUp).Row) myRng.Formula = "=d2*e2" End With End Sub You can plop the formula into the range all at once (like selecting the range, typing in the formula and hitting ctrl-enter manually). And you don't need that =sum() portion in your formula. =d2*e2 is sufficient. pcscsr wrote: All I need to do is code in vba the following formula: =sum(d2*e2) and have the total in column f. The formula then is copied down the column with the row changes. for example =sum(d3*e3) and so on. I know this is simple but I can't seem to get it right so it goes down the column. Thank you for any help you can give me. -- pcscsr ------------------------------------------------------------------------ pcscsr's Profile: http://www.excelforum.com/member.php...o&userid=12006 View this thread: http://www.excelforum.com/showthread...hreadid=276049 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help with a simple formula! | Excel Discussion (Misc queries) | |||
IF formula-simple question; simple operator | Excel Discussion (Misc queries) | |||
Simple problem, simple formula, no FUNCTION ! | Excel Worksheet Functions | |||
Help with simple formula | Excel Discussion (Misc queries) | |||
simple formula? | Excel Discussion (Misc queries) |