Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.tables
|
|||
|
|||
![]()
I am writing a Word Macro that I want to have calculate the value a column of
cellsl only when the value in another cell is 0. I already have the calculation setup but need have the macro look at a specific cell to see if the value in the cell is 0 and if it is, it should do the calculation in another in the column of cells. If it is not 0 then the macro should stop. Thanks in advance. |
#2
![]()
Posted to microsoft.public.word.tables
|
|||
|
|||
![]()
Dim check as Range
Set check = ActiveDocument.Tables(Index).Cell(rownum, colnum).Range 'Set the range to the cell that may contain 0 check.End = check.End - 1 'strip the end of cell marker from the range If Val(check.Text) = 0 then 'put you calculation code here End if -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Doc60" wrote in message ... I am writing a Word Macro that I want to have calculate the value a column of cellsl only when the value in another cell is 0. I already have the calculation setup but need have the macro look at a specific cell to see if the value in the cell is 0 and if it is, it should do the calculation in another in the column of cells. If it is not 0 then the macro should stop. Thanks in advance. |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
What is the formula to calculate a percentage in a Word table? | Tables | |||
In word, how do I calculate cells in a table? | Microsoft Word Help | |||
Auto calculate in a word table | Tables | |||
How do I set up formula in a table to calculate a percentage | Tables | |||
in table in Word: calculate 3 things @ $20 = $60? | Tables |