![]() |
|
#1
|
|||
|
|||
|
I need help in figuring out how to enter a constant based on a value entered into a word table. For instance if the table cell has 98, I need to add 3.3 , if 97.5 I need to add 3.0. The last value is 20 with a constant of 0.47
|
|
#2
|
|||
|
|||
|
Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Select Case CDbl(Left(ActiveDocument.Tables(1).Cell(1, 1).Range.Text, Len(ActiveDocument.Tables(1).Cell(1, 1).Range.Text) - 2))
Case 98
MsgBox 100 / 3.3
Case 97.5
MsgBox 100 / 3
Case 20
MsgBox 100 / 0.47
Case Else
MsgBox 100
End Select
End Sub
|
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
How to create a table with a number of line depending a number entered by user
|
Cellendhyll | Word Tables | 3 | 07-10-2014 05:49 AM |
| Constant Enter Network Password popups | rec | Windows | 0 | 09-13-2013 12:54 AM |
Contact details entered based on multiple drop down selections
|
ntropey87 | Word VBA | 4 | 04-20-2013 11:19 AM |
| Programming based on an enter key event | edayers315 | Word VBA | 0 | 06-11-2010 09:57 AM |
Making sure the correct number of characters are entered.
|
leroytrolley | Excel | 1 | 07-25-2008 06:38 AM |