Prev: Preserve the initial scope of a selection on a search operation and re-use it later
Next: VBA Macro: Word 2003 (FormFields)
From: Dan on 28 Feb 2010 22:14 Using Word 2003, I would like to create a cell in a table. I want the user to enter a number in the cell. I want word to reference another table and find the cell or row where that number fits in. Example: I have a table with four cells. Cell A1 has 1-10 in it. Cell A2 has 11-20 in it. Cell B1 has 'YES' in it, and cell B2 has 'NO' in it. Then, I have another table or possibly, I add a row below the first table. It has three cells. In cell A1 I have text reading: Enter a number between 1 and 20. Cell B1 is where the number will be entered. Cell C1 is where the answer should appear. The answer will be 'YES' or 'NO' depending on the number entered into cell B1. I know that there is a IF THEN function but how do I use it, where do I put it, and how do I toggle the whole thing to make 'YES' appear in C1 after a number is entered? Thanks a million for any help. Dan
From: Doug Robbins - Word MVP on 1 Mar 2010 00:19
Put the following field construction in Cell C1 { IF B1 < 11 "Yes" "No" } You must use Ctrl+F9 to insert the field delimiters { } and you use Alt+F9 to toggle off their display. You will need to update the field (F9 or Print Preview) to see the result. Alternatively, if you put a FormField in cell B1, you could set its "Calculate on exit" property to do the updating. If the situation that you describe is the real situation, there is no requirement to reference the other table. If the situation is not as you describe it, then it would be better if you tell us exactly what it is that you want to do. -- 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, originally posted via msnews.microsoft.com "Dan" <Dan(a)discussions.microsoft.com> wrote in message news:26149F86-CD26-4E51-A5A0-75664DCBBEF6(a)microsoft.com... > Using Word 2003, I would like to create a cell in a table. I want the user > to > enter a number in the cell. I want word to reference another table and > find > the cell or row where that number fits in. > > Example: I have a table with four cells. Cell A1 has 1-10 in it. Cell A2 > has > 11-20 in it. Cell B1 has 'YES' in it, and cell B2 has 'NO' in it. > > Then, I have another table or possibly, I add a row below the first table. > It has three cells. In cell A1 I have text reading: Enter a number > between 1 > and 20. Cell B1 is where the number will be entered. Cell C1 is where > the > answer should appear. The answer will be 'YES' or 'NO' depending on the > number entered into cell B1. > > I know that there is a IF THEN function but how do I use it, where do I > put > it, and how do I toggle the whole thing to make 'YES' appear in C1 after a > number is entered? > Thanks a million for any help. > Dan |