What is the Excel VBScript for the following…

15 pts.
Tags:
Excel macros
Microsoft Excel
VBScript
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
ASKED: April 8, 2009  4:05 PM
UPDATED: April 13, 2009  5:37 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

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.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • SbElectric
    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,540 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following