|
-
Feb 9th, 2006, 12:11 PM
#1
Thread Starter
Fanatic Member
a multiplication question
Hi,
Hope you can help me.. I have those numbers below..I want to craete a small
program that can give me the multiplication result of all these numbers..I dont want to use a calculator to calculate...
I want to paste these numbers to a textbox or a listbox and display the results on a label..Or is it possible to do this kind of calculation using EXCEL
Which function should I use?
*1,65
*1,35
*1,40
*1,35
*1,35
*1,40
*1,65
*1,35
*1,65
*1,25
Thanks...
-
Feb 9th, 2006, 01:31 PM
#2
Re: a multiplication question
If you're using Excel, then the Product function will return what you are after.
I assume those asterisks are not really supposed to be there, and that the commas are the continental form of decimal points.
zaza
-
Feb 9th, 2006, 01:42 PM
#3
Thread Starter
Fanatic Member
Re: a multiplication question
yes you are right...I paste all those nums to a excel page bu it doesn't calculate nor
does the sum..I removed all those asterisks.....I noticed that all of the numbers are aligned left not to right..thats the reason for excel not to calculate...but I could not make them align right...although they are not text ???
-
Feb 9th, 2006, 01:44 PM
#4
Re: a multiplication question
They may be entered as text...select them all, right click and choose Format Cells, then change the format to number.
zaza
-
Feb 9th, 2006, 01:56 PM
#5
Thread Starter
Fanatic Member
Re: a multiplication question
Yes I tried it and other options ,too
but it did not work
-
Feb 9th, 2006, 02:29 PM
#6
Re: a multiplication question
Is there a confusion with using the comma as a decimal point? I have found this to be troublesome in the past. Can you do any numerical operations on them? Does it recognise them as numbers?
zaza
-
Feb 9th, 2006, 03:30 PM
#7
Thread Starter
Fanatic Member
Re: a multiplication question
Thanks Zaza,
I got the solution ..and it works perfect.. I paste and get the result
VB Code:
Private Sub Command1_Click()
Dim texxt As String
Dim asd() As String
Dim iTotal As Double
texxt = Text1.Text
asd = Split(texxt, vbCrLf)
iTotal = 1
For i = LBound(asd) To UBound(asd)
If LenB(asd(i)) <> 0 Then iTotal = iTotal * asd(i)
Next i
MsgBox iTotal
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|