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 » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Conditional Format Switch



 
 
Thread Tools Display Modes
  #1  
Old April 28th, 2010, 11:01 PM posted to microsoft.public.word.mailmerge.fields
bushwood
external usenet poster
 
Posts: 8
Default Conditional Format Switch

How can you format a word 2007 mergefield a certain way depending on the type
of value it encounters in your excel 2007 data source during the mailmerge?
Basically, the merge will encounter blank record, EIN, or Address. We want
the special format switch if encounter EIN, and then if not all numeric just
pull the cell contents is fine.

Thanks for any help!
--
"Gambling is illegal @ Bushwood and I never slice."
  #2  
Old April 28th, 2010, 11:26 PM posted to microsoft.public.word.mailmerge.fields
Peter Jamieson
external usenet poster
 
Posts: 4,550
Default Conditional Format Switch

Can you spell out what
a. could be in this column
b. wat you mean by "EIN" ?

As background, there are (at least) two separate problems when using
Excel and a Mail Merge Data Source:
a. How do you ensure that your data reaches Word intact? (e.g., if the
first 8 rows in your column contain numbers, then the chances are that a
non-numeric text value in the column wi come across as 0)
b. even when the values reach Word intact, how do you decide that a
particular value needs to be formatted as (a) text, (b) numeric, (c)
date etc.


Peter Jamieson

http://tips.pjmsn.me.uk

On 28/04/2010 23:01, bushwood wrote:
How can you format a word 2007 mergefield a certain way depending on the type
of value it encounters in your excel 2007 data source during the mailmerge?
Basically, the merge will encounter blank record, EIN, or Address. We want
the special format switch if encounter EIN, and then if not all numeric just
pull the cell contents is fine.

Thanks for any help!

  #3  
Old April 29th, 2010, 01:11 AM posted to microsoft.public.word.mailmerge.fields
bushwood
external usenet poster
 
Posts: 8
Default Conditional Format Switch

EIN Employer Identification Number. 12-3456789 format always numeric. The
switch is \# ##'-'####### but suppress switch when encounter cell with any
sort of alpha character... can you do this?

I understand the first few rows probelm can be solved with DDE as source
data ? Not really sure how to accomplish this, but I did read through all of
the examples I could find here and over the web.
--
"Gambling is illegal @ Bushwood and I never slice."


"Peter Jamieson" wrote:

Can you spell out what
a. could be in this column
b. wat you mean by "EIN" ?

As background, there are (at least) two separate problems when using
Excel and a Mail Merge Data Source:
a. How do you ensure that your data reaches Word intact? (e.g., if the
first 8 rows in your column contain numbers, then the chances are that a
non-numeric text value in the column wi come across as 0)
b. even when the values reach Word intact, how do you decide that a
particular value needs to be formatted as (a) text, (b) numeric, (c)
date etc.


Peter Jamieson

http://tips.pjmsn.me.uk

On 28/04/2010 23:01, bushwood wrote:
How can you format a word 2007 mergefield a certain way depending on the type
of value it encounters in your excel 2007 data source during the mailmerge?
Basically, the merge will encounter blank record, EIN, or Address. We want
the special format switch if encounter EIN, and then if not all numeric just
pull the cell contents is fine.

Thanks for any help!

.

  #4  
Old April 29th, 2010, 01:24 AM posted to microsoft.public.word.mailmerge.fields
bushwood
external usenet poster
 
Posts: 8
Default Conditional Format Switch

More clarification... merge will encounter blank cells, text cells, numeric
cells, text and numeric cells. We only want the switch on numeric only
cells. Should just pull all cell contents just fine if anything but numeric
only if you can state a condition based on MERGFIELD \* charformat or
something? How do you put an IF statement to valuate format?
--
"Gambling is illegal @ Bushwood and I never slice."


"bushwood" wrote:

EIN Employer Identification Number. 12-3456789 format always numeric. The
switch is \# ##'-'####### but suppress switch when encounter cell with any
sort of alpha character... can you do this?

I understand the first few rows probelm can be solved with DDE as source
data ? Not really sure how to accomplish this, but I did read through all of
the examples I could find here and over the web.
--
"Gambling is illegal @ Bushwood and I never slice."


"Peter Jamieson" wrote:

Can you spell out what
a. could be in this column
b. wat you mean by "EIN" ?

As background, there are (at least) two separate problems when using
Excel and a Mail Merge Data Source:
a. How do you ensure that your data reaches Word intact? (e.g., if the
first 8 rows in your column contain numbers, then the chances are that a
non-numeric text value in the column wi come across as 0)
b. even when the values reach Word intact, how do you decide that a
particular value needs to be formatted as (a) text, (b) numeric, (c)
date etc.


Peter Jamieson

http://tips.pjmsn.me.uk

On 28/04/2010 23:01, bushwood wrote:
How can you format a word 2007 mergefield a certain way depending on the type
of value it encounters in your excel 2007 data source during the mailmerge?
Basically, the merge will encounter blank record, EIN, or Address. We want
the special format switch if encounter EIN, and then if not all numeric just
pull the cell contents is fine.

Thanks for any help!

.

  #5  
Old April 29th, 2010, 02:47 AM posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
external usenet poster
 
Posts: 8,239
Default Conditional Format Switch

As posted in microsoft.public.word.docmanagement, use:

{ IF { = { MERGEFIELD Address } - { MERGEFIELD Address } } = 0 { MERGEFIELD
Address \# "##'-'######"] } { MERGEFIELD Address } }

or whatever the field name is. Only if its contents are numeric will the
result of the subtraction will be zero.

--
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

"bushwood" wrote in message
...
More clarification... merge will encounter blank cells, text cells,
numeric
cells, text and numeric cells. We only want the switch on numeric only
cells. Should just pull all cell contents just fine if anything but
numeric
only if you can state a condition based on MERGFIELD \* charformat or
something? How do you put an IF statement to valuate format?
--
"Gambling is illegal @ Bushwood and I never slice."


"bushwood" wrote:

EIN Employer Identification Number. 12-3456789 format always numeric.
The
switch is \# ##'-'####### but suppress switch when encounter cell with
any
sort of alpha character... can you do this?

I understand the first few rows probelm can be solved with DDE as source
data ? Not really sure how to accomplish this, but I did read through
all of
the examples I could find here and over the web.
--
"Gambling is illegal @ Bushwood and I never slice."


"Peter Jamieson" wrote:

Can you spell out what
a. could be in this column
b. wat you mean by "EIN" ?

As background, there are (at least) two separate problems when using
Excel and a Mail Merge Data Source:
a. How do you ensure that your data reaches Word intact? (e.g., if
the
first 8 rows in your column contain numbers, then the chances are that
a
non-numeric text value in the column wi come across as 0)
b. even when the values reach Word intact, how do you decide that a
particular value needs to be formatted as (a) text, (b) numeric, (c)
date etc.


Peter Jamieson

http://tips.pjmsn.me.uk

On 28/04/2010 23:01, bushwood wrote:
How can you format a word 2007 mergefield a certain way depending on
the type
of value it encounters in your excel 2007 data source during the
mailmerge?
Basically, the merge will encounter blank record, EIN, or Address.
We want
the special format switch if encounter EIN, and then if not all
numeric just
pull the cell contents is fine.

Thanks for any help!
.

  #6  
Old April 29th, 2010, 07:19 PM posted to microsoft.public.word.mailmerge.fields
bushwood
external usenet poster
 
Posts: 8
Default Conditional Format Switch

I guess you can't really evaluate MERGEFIELD formats like I was thinking but
this should definitely achieve the same end result for me. Thanks very much!

"Doug Robbins - Word MVP" wrote:

As posted in microsoft.public.word.docmanagement, use:

{ IF { = { MERGEFIELD Address } - { MERGEFIELD Address } } = 0 { MERGEFIELD
Address \# "##'-'######"] } { MERGEFIELD Address } }

or whatever the field name is. Only if its contents are numeric will the
result of the subtraction will be zero.

--
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

"bushwood" wrote in message
...
More clarification... merge will encounter blank cells, text cells,
numeric
cells, text and numeric cells. We only want the switch on numeric only
cells. Should just pull all cell contents just fine if anything but
numeric
only if you can state a condition based on MERGFIELD \* charformat or
something? How do you put an IF statement to valuate format?
--
"Gambling is illegal @ Bushwood and I never slice."


"bushwood" wrote:

EIN Employer Identification Number. 12-3456789 format always numeric.
The
switch is \# ##'-'####### but suppress switch when encounter cell with
any
sort of alpha character... can you do this?

I understand the first few rows probelm can be solved with DDE as source
data ? Not really sure how to accomplish this, but I did read through
all of
the examples I could find here and over the web.
--
"Gambling is illegal @ Bushwood and I never slice."


"Peter Jamieson" wrote:

Can you spell out what
a. could be in this column
b. wat you mean by "EIN" ?

As background, there are (at least) two separate problems when using
Excel and a Mail Merge Data Source:
a. How do you ensure that your data reaches Word intact? (e.g., if
the
first 8 rows in your column contain numbers, then the chances are that
a
non-numeric text value in the column wi come across as 0)
b. even when the values reach Word intact, how do you decide that a
particular value needs to be formatted as (a) text, (b) numeric, (c)
date etc.


Peter Jamieson

http://tips.pjmsn.me.uk

On 28/04/2010 23:01, bushwood wrote:
How can you format a word 2007 mergefield a certain way depending on
the type
of value it encounters in your excel 2007 data source during the
mailmerge?
Basically, the merge will encounter blank record, EIN, or Address.
We want
the special format switch if encounter EIN, and then if not all
numeric just
pull the cell contents is fine.

Thanks for any help!
.

 




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 02:22 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.