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

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?
 
L

Lars-Åke Aspelin

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
 
S

Sheeloo

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
 
T

Tdp

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
 
Top