Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Tdp Tdp is offline
external usenet poster
 
Posts: 74
Default (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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 913
Default (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
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,805
Default (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

  #4   Report Post  
Posted to microsoft.public.excel.misc
Tdp Tdp is offline
external usenet poster
 
Posts: 74
Default (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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how can I disable "cutting cells" and "drag and drop "in excel ? mwoody Excel Worksheet Functions 4 August 25th 08 03:53 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Check if cells contain the word "Thailand", return "TRUE" ali Excel Worksheet Functions 7 September 14th 07 09:53 AM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
multiplying by blank cells input by "IF" functions tiaga Excel Discussion (Misc queries) 2 November 21st 06 06:21 PM


All times are GMT +1. The time now is 01:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"