A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Tables
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

IF statement macro



 
 
Thread Tools Display Modes
  #1  
Old November 11th, 2009, 04:31 PM posted to microsoft.public.word.tables
Brandon
external usenet poster
 
Posts: 116
Default IF statement macro

I have a table within a Word doc that has 2 columns and 4 rows. The document
is a template that contains field names for a Oracle based software. Once the
user executes the template the data will be inserted into the specific points
on the doc based on the field names. What I'm trying to do is upon exectution
of the document have a macro that will put certain text into a cell "IF
A1=A2, A3, OR A4" The corresponding descriptions will go into B1.


TABLE:
Column 1 Column 2
A1:FIELD NAME B1:results from formula to be inserted here
A2:homeoffi B2:description of homeoffi
A3:jobsite B3:description of jobsite
A4ther B4:description of other

I'm in no way an expert on VBA and in fact I've never worked with it. I'm
trying to teach myself how to use it.
  #2  
Old November 11th, 2009, 06:17 PM posted to microsoft.public.word.tables
macropod[_2_]
external usenet poster
 
Posts: 2,402
Default IF statement macro

Hi Brandon,

How are the data being input into A2:A4? If you're using formfields in a document protected for forms, you can do what you're after
without a macro. If you're not using either a userform or formfields, even a macro might not be much use, since there are not
table-related events in Word to trigger one.

--
Cheers
macropod
[Microsoft MVP - Word]


"Brandon" wrote in message ...
I have a table within a Word doc that has 2 columns and 4 rows. The document
is a template that contains field names for a Oracle based software. Once the
user executes the template the data will be inserted into the specific points
on the doc based on the field names. What I'm trying to do is upon exectution
of the document have a macro that will put certain text into a cell "IF
A1=A2, A3, OR A4" The corresponding descriptions will go into B1.


TABLE:
Column 1 Column 2
A1:FIELD NAME B1:results from formula to be inserted here
A2:homeoffi B2:description of homeoffi
A3:jobsite B3:description of jobsite
A4ther B4:description of other

I'm in no way an expert on VBA and in fact I've never worked with it. I'm
trying to teach myself how to use it.


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:25 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.