how can i calculate formulas automatically

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a worksheet with three columns. Col1 is item, Col2 is price and Col3
is quantity. I need a column 4 that calculates col2 * col3 and displays
total. I tried formulas, but i need the total to be displayed automatically
whenever i navigate to that column after entering col 2 and col 3. I dont
want to drag the formula manually to se the results. It should be like pure
forms. Any advice?
 
Seige Silver wrote:
|| I have a worksheet with three columns. Col1 is item, Col2 is price
|| and Col3 is quantity. I need a column 4 that calculates col2 * col3
|| and displays total. I tried formulas, but i need the total to be
|| displayed automatically

What PRECISELY do you mean by "displayed automatically"? if you put a
formula in column 4 that says "Col2*col3 then it WILL display
"automatically.


|| whenever i navigate to that column after
|| entering col 2 and col 3. I dont want to drag the formula manually
|| to se the results.

And what do you mean "drag the formula manually"?
 
In order for a cell to know what to display, it must be told. If you don't
want to copy your formula down, about the only simple option is to click in
your existing records and go to Data>Form to enter new ones. The Form feature
will carry your calculations down to the new records as it appends them to
the bottom of the existing list.

HTH |:>)
 
right click sheet tab>view code>insert this>save.
Now, when anything is entered in col 3 (below row1) it will be multiplied by
col 2 and entered in col 4
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row < 2 Or Target.Column <> 3 Then Exit Sub
Target.Offset(, 1) = Target.Offset(, -1) * Target
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top