I am putting together a form in Excel 2003 where several options can be
selected, and I want to combine the information in the selected cells in
another cell with commas seperating the information. For example, I have one
column with environmental hazards listed, one in each row (storage tanks,
batteries, generaters), and in the next column the person filling out the
form can select yes or no if that hazard is present. I want to take the
information from the cells next to the cells that are marked yes, and put it
together, separated with commas, in another cell in a different worksheet .
If someone could please help, I would sure appreciate it!
If the list of items isn't too many, this formulas play may suffice ..
Sample construct available at:
cjoint.com/?mqhAvzNhVX
CombineMultipleCellContentsInOneCell_Debbie_wks.xl s
In Sheet: Q,
Assume the list of items is in A2:A10 (a short list), with B2:B10 containing
a data validation* droplist, e.g.:
*created via Data gt; Validation:
with settings: under quot;Allow:quot; List, Source: Yes,No
EnvHazards CheckList
Storage tanks Yes
Batteries No
Generators Yes
etc
Put in C2, copy down to C10:
=IF(A2=quot;quot;,quot;quot;,IF(B2=quot;Yesquot;,SUBSTITUTE(TRIM(A2),quot; quot;,quot;-quot;),quot;quot;))
Then in Sheet: A,
Put in A2:
=SUBSTITUTE(TRIM(Q!C2amp;quot; quot;amp;Q!C3amp;quot; quot;amp;Q!C4amp;quot; quot;amp;Q!C5amp;quot; quot;amp;Q!C6amp;quot; quot;amp;Q!C7amp;quot;
quot;amp;Q!C8amp;quot; quot;amp;Q!C9amp;quot; quot;amp;Q!C10),quot; quot;,quot;, quot;)
A2 will return the desired results**
**any item with gt; 1 word will appear hyphenated
For the sample above, we'd get in A2:
Storage-tanks, Generators
Adapt to suit ..
--
Rgds
Max
xl 97
---
Singapore, GMT 8
xdemechanik
savefile.com/projects/236895
--
quot;Debbiequot; gt; wrote in message
...
gt; I am putting together a form in Excel 2003 where several options can be
gt; selected, and I want to combine the information in the selected cells in
gt; another cell with commas seperating the information. For example, I have
one
gt; column with environmental hazards listed, one in each row (storage tanks,
gt; batteries, generaters), and in the next column the person filling out the
gt; form can select yes or no if that hazard is present. I want to take the
gt; information from the cells next to the cells that are marked yes, and put
it
gt; together, separated with commas, in another cell in a different worksheet
..
gt;
gt; If someone could please help, I would sure appreciate it!
Thank you!!! That worked great. )
quot;Maxquot; wrote:
gt; If the list of items isn't too many, this formulas play may suffice ..
gt;
gt; Sample construct available at:
gt; cjoint.com/?mqhAvzNhVX
gt; CombineMultipleCellContentsInOneCell_Debbie_wks.xl s
gt;
gt; In Sheet: Q,
gt;
gt; Assume the list of items is in A2:A10 (a short list), with B2:B10 containing
gt; a data validation* droplist, e.g.:
gt; *created via Data gt; Validation:
gt; with settings: under quot;Allow:quot; List, Source: Yes,No
gt;
gt; EnvHazards CheckList
gt; Storage tanks Yes
gt; Batteries No
gt; Generators Yes
gt; etc
gt;
gt; Put in C2, copy down to C10:
gt; =IF(A2=quot;quot;,quot;quot;,IF(B2=quot;Yesquot;,SUBSTITUTE(TRIM(A2),quot; quot;,quot;-quot;),quot;quot;))
gt;
gt; Then in Sheet: A,
gt;
gt; Put in A2:
gt; =SUBSTITUTE(TRIM(Q!C2amp;quot; quot;amp;Q!C3amp;quot; quot;amp;Q!C4amp;quot; quot;amp;Q!C5amp;quot; quot;amp;Q!C6amp;quot; quot;amp;Q!C7amp;quot;
gt; quot;amp;Q!C8amp;quot; quot;amp;Q!C9amp;quot; quot;amp;Q!C10),quot; quot;,quot;, quot;)
gt;
gt; A2 will return the desired results**
gt; **any item with gt; 1 word will appear hyphenated
gt;
gt; For the sample above, we'd get in A2:
gt; Storage-tanks, Generators
gt;
gt; Adapt to suit ..
gt; --
gt; Rgds
gt; Max
gt; xl 97
gt; ---
gt; Singapore, GMT 8
gt; xdemechanik
gt; savefile.com/projects/236895
gt; --
gt; quot;Debbiequot; gt; wrote in message
gt; ...
gt; gt; I am putting together a form in Excel 2003 where several options can be
gt; gt; selected, and I want to combine the information in the selected cells in
gt; gt; another cell with commas seperating the information. For example, I have
gt; one
gt; gt; column with environmental hazards listed, one in each row (storage tanks,
gt; gt; batteries, generaters), and in the next column the person filling out the
gt; gt; form can select yes or no if that hazard is present. I want to take the
gt; gt; information from the cells next to the cells that are marked yes, and put
gt; it
gt; gt; together, separated with commas, in another cell in a different worksheet
gt; ..
gt; gt;
gt; gt; If someone could please help, I would sure appreciate it!
gt;
gt;
gt;
You're welcome !
Thanks for the feedback ..
--
Rgds
Max
xl 97
---
Singapore, GMT 8
xdemechanik
savefile.com/projects/236895
--
quot;Debbiequot; gt; wrote in message
...
gt; Thank you!!! That worked great. )
- Jul 25 Fri 2008 20:45
How do I combine the contents of multiple cells in one cell?
close
全站熱搜
留言列表
發表留言
留言列表

