Microsoft Office Forums

Go Back   Microsoft Office Forums > Microsoft Word > Word

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 11-13-2017, 01:24 PM
TImer TImer is offline Windows 10 Office 2016
Novice
 
Join Date: Nov 2017
Posts: 7
TImer is on a distinguished road
Default How to multiply numbers

Hello,



I want to select line of tablets with numbers and make them all x2 or x3 at least, and best like x2.43 is there are any way to do this?
Result sould appear in every sepereted tab and replace old number.


Thank's for your time.
Reply With Quote
  #2  
Old 11-13-2017, 01:49 PM
macropod's Avatar
macropod macropod is online now Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 16,554
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

Your requirements are unclear. I have no idea what you mean by a 'line of tablets with numbers' or where these might be found in your document. Without actually seeing the document, it can be difficult for anyone to provide an effective solution. Can you attach a document to a post with some representative data (delete anything sensitive)? You do this via the paperclip symbol on the 'Go Advanced' tab at the bottom of this screen.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #3  
Old 11-13-2017, 02:09 PM
TImer TImer is offline Windows 10 Office 2016
Novice
 
Join Date: Nov 2017
Posts: 7
TImer is on a distinguished road
Default

Lets say i have 2x1 table in one i wrote
2 and in another 5, i want to select both tables and multiply by my selected number, lets say its number 2 so in the end result i expect table 1 to become 4 (from 2) and table 2 to become 10 (from 5).

P.s Sorry for bad English.
Reply With Quote
  #4  
Old 11-13-2017, 03:35 PM
macropod's Avatar
macropod macropod is online now Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 16,554
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

You still haven't provided enough information. Do these numbers ever exist outside a table? Are there any other numbers in the tables? Is there any other text in the cells containing these numbers? Etc., etc.

If you want help, kindly attach a document containing representative content as requested.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #5  
Old 11-14-2017, 05:42 AM
TImer TImer is offline Windows 10 Office 2016
Novice
 
Join Date: Nov 2017
Posts: 7
TImer is on a distinguished road
Default

Reply With Quote
  #6  
Old 11-14-2017, 12:14 PM
macropod's Avatar
macropod macropod is online now Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 16,554
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

You seem determined not to attach a document...
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #7  
Old 11-14-2017, 01:29 PM
TImer TImer is offline Windows 10 Office 2016
Novice
 
Join Date: Nov 2017
Posts: 7
TImer is on a distinguished road
Default

I just can't see how it might help to get a lesson , or point me to one. I have 10 word documents for this job, and remaking them again, and again..So if the point of yours to do it for me, its not going to help. But here you go, i hope this will help, i give the same as in picture.
Attached Files
File Type: docx example.docx (12.5 KB, 1 views)
Reply With Quote
  #8  
Old 11-14-2017, 02:40 PM
macropod's Avatar
macropod macropod is online now Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 16,554
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

You will need a macro for this. Try:
Code:
Sub Demo()
Dim Tbl As Table, r As Long, c As Long, Rslt, sMul As Single, Rng As Range
Rslt = InputBox("What is the multiplier?")
If IsNumeric(Rslt) = False Then Exit Sub
sMul = CSng(Rslt)
For Each Tbl In ActiveDocument.Tables
  With Tbl
    For r = 3 To .Rows.Count
      For c = 2 To .Columns.Count
        With .Cell(r, c)
          Set Rng = .Range
          Rslt = Split(Split(Rng.Text, vbCr)(0), " ")(0)
          If IsNumeric(Rslt) Then
            Rng.End = Rng.Start + Len(Rslt)
            Rng.Text = Rslt * sMul
          End If
        End With
      Next
    Next
  End With
Next
End Sub
For PC macro installation & usage instructions, see: http://www.gmayor.com/installing_macro.htm
For Mac macro installation & usage instructions, see: https://wordmvp.com/Mac/InstallMacro.html
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #9  
Old 11-14-2017, 03:09 PM
TImer TImer is offline Windows 10 Office 2016
Novice
 
Join Date: Nov 2017
Posts: 7
TImer is on a distinguished road
Default

Ahahaha, i laughed good.. when i have read "idiots' guide to installing macros", while i'm just regular user.. Thinking about this installation and getting a question "what after?" gives me headache.
Is this Macros worth it? Will i get my calculations fast and in any way i want?
Or better just do it in hard way number by number calculate, write and rewrite.
What your thoughts about that? Because my priority is just to waist less time.
Reply With Quote
  #10  
Old 11-14-2017, 03:23 PM
macropod's Avatar
macropod macropod is online now Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 16,554
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

Quote:
Originally Posted by TImer View Post
Is this Macros worth it? Will i get my calculations fast and in any way i want?
Whether it's worth it is up to you. In your attachment, the macro took less than 1 second to update all the tables...
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #11  
Old 11-14-2017, 03:42 PM
TImer TImer is offline Windows 10 Office 2016
Novice
 
Join Date: Nov 2017
Posts: 7
TImer is on a distinguished road
Default

i understanding that its annoying to you, but if you answer a question please expand information, you can always answer when ever you want, week or even month later, its up to you, otherwise what point of "helping" at all. In any case you gaved my some useful information, thank you for that.
Reply With Quote
  #12  
Old 11-14-2017, 03:45 PM
macropod's Avatar
macropod macropod is online now Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 16,554
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

Quote:
Originally Posted by TImer View Post
i understanding that its annoying to you, but if you answer a question please expand information
I have no idea what you mean by that - or if maybe you're just being rude... I gave you a full answer.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #13  
Old 11-14-2017, 03:47 PM
TImer TImer is offline Windows 10 Office 2016
Novice
 
Join Date: Nov 2017
Posts: 7
TImer is on a distinguished road
Default

You think +rep is rude?..
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Tax - Multiply IF captainron19 Excel 2 12-07-2016 02:09 PM
Create a formula to count all occurances of HH but multiply by 0.5 first stupidgirl Excel 6 06-14-2016 03:50 PM
multiply by incrementing by 5s marynomore Excel 2 03-27-2013 05:36 AM
Can we multiply two numbers in a word aligahk06 Word 1 08-28-2010 03:41 AM
Creating multiply word documents Michel777 Word 0 04-26-2010 05:00 AM


All times are GMT -7. The time now is 08:39 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
MSOfficeForums.com is not affiliated with Microsoft