![]() |
(FAO "Mike H") Multiplying cells using vb codes??????????
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? -- Tdp |
(FAO "Mike H") Multiplying cells using vb codes??????????
On Sun, 14 Dec 2008 07:55:00 -0800, Tdp
wrote: 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 |
(FAO "Mike H") Multiplying cells using vb codes??????????
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 "Lars-Ã…ke Aspelin" wrote: On Sun, 14 Dec 2008 07:55:00 -0800, Tdp wrote: 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 |
(FAO "Mike H") Multiplying cells using vb codes??????????
Thank you both,
They both work. -- Tdp "Sheeloo" wrote: 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 "Lars-Ã…ke Aspelin" wrote: On Sun, 14 Dec 2008 07:55:00 -0800, Tdp wrote: 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 |
All times are GMT +1. The time now is 12:59 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com