Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default simple formula


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default simple formula


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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default simple formula

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with a simple formula! ChazFr Excel Discussion (Misc queries) 8 October 21st 08 12:32 PM
IF formula-simple question; simple operator Rich D Excel Discussion (Misc queries) 4 December 6th 07 03:36 PM
Simple problem, simple formula, no FUNCTION ! Ron@Buy Excel Worksheet Functions 6 September 28th 07 04:51 PM
Help with simple formula CarolineHedges Excel Discussion (Misc queries) 1 August 14th 06 12:36 PM
simple formula? jrose Excel Discussion (Misc queries) 7 April 21st 06 06:27 PM


All times are GMT +1. The time now is 02:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"