Results 1 to 8 of 8
  1. #1
    Star Lounger
    Join Date
    Jun 2002
    Location
    Johannesburg, Gauteng, South Africa
    Posts
    59
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Table and/or Field Calculations (2000 SP3)

    I have spent a fair amount of time searching the forum and have downloaded and read macropod's Word Field Maths but am still unable to do what I need to do. In Excel the formula would be =IF(B5>4000000,100000,round(B5*2.5/100,2)). Whether I do this by table math or by field codes is immaterial - the preferred option is however table math. Can someone please help. Thanks

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Table and/or Field Calculations (2000 SP3)

    It might be easier to embed an Excel worksheet in your Word document. Then, you can use Excel's calculation engine.

  3. #3
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Table and/or Field Calculations (2000 SP3)

    Hi Raymond,
    Your query is more of a statement than a question! How exactly do you want to go about this. Please clarify what you want to do?
    PS...(Nice flag!) <img src=/S/smile.gif border=0 alt=smile width=15 height=15>
    Regards,
    Rudi

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Table and/or Field Calculations (2000 SP3)

    I think that "Table Math" is a shortcut way of inserting fairly simple formula (=) field codes, so really, they are the same thing in the end.

    The basic outline for an IF field is as follows:
    1. <LI>Press Ctrl+F9 to insert a pair of field braces in the target cell (looks like { } with the insertion point inside)
      <LI>Type in IF b5 > 4000000 "100000" "FALSE"
      <LI>Select the field and press F9 to refresh the result
      <LI>Use Alt+F9 to toggle between showing field codes and results to refine your field
    Note: You do not use commas between the TRUE and FALSE values.

    To figure out the syntax for the later formula, it is useful to test on a simple table one step at a time. Once you've got the formula (and the Insert>Field... dialog can help with the functions), you can replace the "FALSE" with that and you should have a working solution.

  5. #5
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Table and/or Field Calculations (2000 SP3)

    Hi Raymond:
    If you follow Jefferson's instructions in <post#=427137>post 427137</post#>, you can then replace False with
    { =round(B5*2.5/100,4) }

    where the curly brackets are inserted by pressing Ctrl+F9, not typed. You must place that field within quotes.
    Cheers,

  6. #6
    Star Lounger
    Join Date
    Jun 2002
    Location
    Johannesburg, Gauteng, South Africa
    Posts
    59
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Re: Table and/or Field Calculations (2000 SP3)

    Thanks guys. I still could not get it to work so I changed the b5 to a field named with a bookmark and it works fine. Once again the forum to the rescue!

  7. #7
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Table and/or Field Calculations (2000 SP3)

    I guess we should have asked where you were putting the formula: references like b5 are only recognized within the same table. <img src=/S/smile.gif border=0 alt=smile width=15 height=15> (Oh, and I believe they need a space after them, before any operator.)

  8. #8
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: Table and/or Field Calculations (2000 SP3)

    Hi Jefferson,

    You can also use cell references from outside a table provided the table is bookmarked and you include the table bookmark in the reference. This is explained in <post#=365442>post 365442</post#>.

    Cheers
    Oh, and fields that use cell references don't need spaces between the cell references and operators.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •