(FAO "Mike H") Multiplying cells using vb codes??????????

  • Thread starter Thread starter Tdp
  • Start date Start date
T

Tdp

Mike H,
You gave me the following code sum cells.
UserForm1.TextBox321.Text = WorksheetFunction.Sum(Range("BR4:BR14"))
Which works great................Thanks.

I have one more question, how do I Multiply to cells together using the same
code?
 
Mike H,
You gave me the following code sum cells.
UserForm1.TextBox321.Text = WorksheetFunction.Sum(Range("BR4:BR14"))
Which works great................Thanks.

I have one more question, how do I Multiply to cells together using the same
code?


Replace the Sum part of your code with Product, like
Product(Range("A10","C13"))
if cells A10 and C13 are the two cells you want to multiply.

Hope this helps / Lars-Åke
 
Sample code

Sub Test()
For i = 1 To 10
Cells(i, 1) = Cells(i, 3) * 5
Next i
End Sub

This will multiply the cells in C1:C10 with 5 and put the result in A1:A10
 
Thank you both,
They both work.
--
Tdp


Sheeloo said:
Sample code

Sub Test()
For i = 1 To 10
Cells(i, 1) = Cells(i, 3) * 5
Next i
End Sub

This will multiply the cells in C1:C10 with 5 and put the result in A1:A10
 

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