15 pts.
 What is the Excel VBScript for the following…
Avatar I put a value in cell B1 and a value in cell C1. Then, when I put a value in A1, I need both B1 and C1 to over-write themselves and become the product of A1*B1 and A1*C1. The same for A2,B2,C2 and A3,B3,C3, etc

Software/Hardware used:
ASKED: April 8, 2009  4:05 PM
UPDATED: April 13, 2009  5:37 AM

Answer Wiki:
you need to create a macro to do the calculation for this. Alternatively you can put B and C column values in sheet2 and do your product formula in sheet1 linking column A in sheet 1 and columns B and C in sheet 2.
Last Wiki Answer Submitted:  April 9, 2009  11:38 pm  by  Twlp123   165 pts.
All Answer Wiki Contributors:  Twlp123   165 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

This is pretty simple macro to code but I am not sure why you want to do this way. One of the cardinal rules in Information Processing and Auditing is to preserve the input data. This violates the rule in the sense that the initial B1 and C1 data are being changed.
Twlp123 has correctly suggested using Sheet 2.

Anyway, if you want to write a macro (say for 5 rows) use the following:
Sub Mult()
For I = 1 to 5
For J = 2 to 3
Cells(I,J) = Cells (I,1) * Cells(I,J)
Next J
Next I
End Sub

 2,510 pts.