Results 1 to 7 of 7

Thread: a multiplication question

  1. #1

    Thread Starter
    Fanatic Member merhaba's Avatar
    Join Date
    Sep 2002
    Location
    Istanbul,Bartin-Gallipoli(Gelibolu-Canakkale)
    Posts
    601

    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...

  2. #2
    Frenzied Member zaza's Avatar
    Join Date
    Apr 2001
    Location
    Borneo Rainforest Habits: Scratching
    Posts
    1,486

    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

  3. #3

    Thread Starter
    Fanatic Member merhaba's Avatar
    Join Date
    Sep 2002
    Location
    Istanbul,Bartin-Gallipoli(Gelibolu-Canakkale)
    Posts
    601

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

  4. #4
    Frenzied Member zaza's Avatar
    Join Date
    Apr 2001
    Location
    Borneo Rainforest Habits: Scratching
    Posts
    1,486

    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

  5. #5

    Thread Starter
    Fanatic Member merhaba's Avatar
    Join Date
    Sep 2002
    Location
    Istanbul,Bartin-Gallipoli(Gelibolu-Canakkale)
    Posts
    601

    Re: a multiplication question

    Yes I tried it and other options ,too
    but it did not work

  6. #6
    Frenzied Member zaza's Avatar
    Join Date
    Apr 2001
    Location
    Borneo Rainforest Habits: Scratching
    Posts
    1,486

    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

  7. #7

    Thread Starter
    Fanatic Member merhaba's Avatar
    Join Date
    Sep 2002
    Location
    Istanbul,Bartin-Gallipoli(Gelibolu-Canakkale)
    Posts
    601

    Re: a multiplication question

    Thanks Zaza,
    I got the solution ..and it works perfect.. I paste and get the result

    VB Code:
    1. Private Sub Command1_Click()
    2. Dim texxt As String
    3. Dim asd() As String
    4. Dim iTotal As Double
    5. texxt = Text1.Text
    6. asd = Split(texxt, vbCrLf)
    7. iTotal = 1
    8. For i = LBound(asd) To UBound(asd)
    9.     If LenB(asd(i)) <> 0 Then iTotal = iTotal * asd(i)
    10. Next i
    11. MsgBox iTotal
    12. 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
  •  



Click Here to Expand Forum to Full Width