Well, based on your formula it looks like you are going with a brute force
solution. Here are a few thoughts;
(1) To avoid having the extra numbers show up, you will have to determine
whether each cell is empty. Your base formula for each cell, instead of
simply "1. "& E21... you will have an if statement, something like:
if(E21<>"","1. "& E21 & ", ","")
This checks to see if the cell is blank, if not it puts together the output
for just that one cell, otherwise, it returns a zero-length string. Note that
it adds a comma (and space) on the back of whatever it returns, to make it
easier to string multiple cells together.
Now you (may) have two problems when you string multiple statements
together; first, I don't use XL2007, but in 2003 and earlier I believe you
may run into limits on the number of conditions that can be in a formula,or
the overall length of the formula in one cell. Not to worry- if needed, you
can build pieces of the combined formula (below) in multiple hidden columns,
and then use your overall output cell to pull together those pieces. The
other problem is that you will have an extra comma on the end of your output,
but I'll discuss that below.
So now you may have a cell [AA12] with something like:
[AA12]=Concatenate(if(E21<>"","1. "&E21,""),if(F21<>"","2.
"&F21,""),if(G21<>"","3. "&G21,""),if(H21<>"","4. "&H21,""),if(I21<>"","5..
"&I21,""))
and another cell [AB12] with
[AB12]=Concatenate(if(J21<>"","6. "&J21,""),if(K21<>"","7.
"&K21,""),if(L21<>"","8. "&L21,""),if(M21<>"","9. "&M21,""),if(N21<>"","10.
"&N21,""))
Let's say that the results in the first cell ends up being:
1. Missing file,
And the second cell ends up as:
6. No Coverage,
So your final cell could just be
=concatenate (AA21, AB21)
and would show
1. Missing file, 6. No Coverage,
The problem is that you have a trailing comma, which may be distracting. If
you knew you had at least one item on every line, it would be easy to usea
=Left statement to clean it up by removing just the last two characters;
= Left(concatenate (AA21, AB21),len(concatenate (AA21, AB21)-2)
this would pull off the comma and the final space. However, if you have rows
that won't have any comments at all, you'll need another IF statement to make
sure that the final value has at least 2 characters before you try to remove
the last two (otherwise you will get an error)
=IF(Len(concatenate (AA21, AB21))>2, Left(concatenate (AA21,
AB21),len(concatenate (AA21, AB21)-2),"")
This is all aircode (well, air-formula, anyway), but it should put you on
the right path.
HTH,
Keith
There will be blanks in some of the fields. I already have this
formula but I dont like that when something is not entered into the
cell the number still remains in the B232 cell. I only want the
numbers present when data is entered into the cell. Does that make
sense?
Here is my formula:
="1. "&""&E21&" "&F21&" 2. "&E29&" "&F29&" 3. "&E33&"
"&F33&" 4. "&E37&" "&F37&" 5. "&E44&" "&F44&" 6a. "&E51&"
"&F51&" 6b. "&E55&" "&F55&" 6c. "&E59&""&F59&" 6d.
"&E63&" "&F63&" 7. "&E67&""&F67&" 8. "&E71&" "&F71&" 9.
"&E75&" "&F75&" 10a. "&E82&" "&F82&" 11. "&E87&" "&F87&"
12. "&E91&" "&F91&" 13. "&E97&" "&F97&" 14. "&E107&"
"&F107&" 15. "&E111&" "&F111&" 16. "&E115&""&F115&" 17.
"&E119&" "&F119&" 18a. "&E126&" "&F126&" 19. "&E130&"
"&F130&" 20. "&E142&" "&F142&" 21a. "&E149&" "&F149&" 22.
"&E155&" "&F155&" 23. "&E165&" "&F165&" 24a. "&E178&"
"&F178&" 25a. "&E185&" "&F185&" 25c. "&E194&" "&F194&"
26a. "&E203&" "&F203&" 26b. "& E207 &" "&F207 &" 27. "&E211&"
"&F211&" 28a. "& E215&" "& F215&" 29. "&E222 &" "& F222&"
29a. "&E226&" "& F226
Thanks!- Hide quoted text -
- Show quoted text -