D
Dee
Hope this isn't too long. I'm using Word 2003
I'm pulling data from various spots in a data base. I've created the
formula to insert a comma in between each peice of data. My problem is, the
comma is being inserted after the of last piece of data even though there is
nothing after it.
This is difficult to explain without seeing the actual data base & document
but I'll try.....assume these people are Pilots of planes
Field Name Data
Name1 Susan
Name2 Bob
Name3 Pat
Name4 Tom
In a different place in the data base there are fields where we indicate
which person flies which planes. So on the Plane section of the data base
the user fills in as follows:
Plane#1 Screen: Pilots: 1 2 3 4 (field names are Pilot1; Pilot2,Pilot3,
Pilot4)
Plane#2 Screen: Pilots: 2 3 4
Plane#3 Screen: Pilots: 1 4
I want to pull the names from the fields that have data and separate them
with a comma. The names will be listed under each plane.
My formula looks like this:
{ IF "<PILOT1>" = "1""<NAME1>"""}{ IF "<PILOT1>" = "2""<NAME2>"""}{ IF
"<PILOT1>" = "3""<NAME3>"""}{ IF "<PILOT1>" = "4""<NAME4>"""}( IF "<PILOT1>"
<> " "","""} Then I repeat this formula for each Pilot - it's one big long
formula.
So the results look like this:
Under the first plane: Susan, Bob, Pat, Tom,
Under the second plane: Bob, Pat, Tom,
Under the thrid plane: Susan, Tom,
If there were no pilots entered there would show ,,,,
It works fine and inserts the comma in between each pilot until the last
pilot when a comma is inserted even though there is nothing after it. Can
anybody tell me what I'm doing wrong?
Thx
Dee
I'm pulling data from various spots in a data base. I've created the
formula to insert a comma in between each peice of data. My problem is, the
comma is being inserted after the of last piece of data even though there is
nothing after it.
This is difficult to explain without seeing the actual data base & document
but I'll try.....assume these people are Pilots of planes
Field Name Data
Name1 Susan
Name2 Bob
Name3 Pat
Name4 Tom
In a different place in the data base there are fields where we indicate
which person flies which planes. So on the Plane section of the data base
the user fills in as follows:
Plane#1 Screen: Pilots: 1 2 3 4 (field names are Pilot1; Pilot2,Pilot3,
Pilot4)
Plane#2 Screen: Pilots: 2 3 4
Plane#3 Screen: Pilots: 1 4
I want to pull the names from the fields that have data and separate them
with a comma. The names will be listed under each plane.
My formula looks like this:
{ IF "<PILOT1>" = "1""<NAME1>"""}{ IF "<PILOT1>" = "2""<NAME2>"""}{ IF
"<PILOT1>" = "3""<NAME3>"""}{ IF "<PILOT1>" = "4""<NAME4>"""}( IF "<PILOT1>"
<> " "","""} Then I repeat this formula for each Pilot - it's one big long
formula.
So the results look like this:
Under the first plane: Susan, Bob, Pat, Tom,
Under the second plane: Bob, Pat, Tom,
Under the thrid plane: Susan, Tom,
If there were no pilots entered there would show ,,,,
It works fine and inserts the comma in between each pilot until the last
pilot when a comma is inserted even though there is nothing after it. Can
anybody tell me what I'm doing wrong?
Thx
Dee