View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
K Dales[_2_] K Dales[_2_] is offline
external usenet poster
 
Posts: 1,163
Default Check columns for data match...

You can do this as a worksheet formula instead of code; below is the formula
for K2, which could then be copied down for each row in your list:

=IF(E2,E$1,"")&IF(F2,F$1,"")&IF(G2,G$1,"")&IF(H2,H $1,"")&IF(I2,I$1,"")&IF(J2,J$1,"")

If you want spaces between the label names:
=TRIM(IF(E2,E$1&" ","")&IF(F2,F$1&" ","")&IF(G2,G$1&" ","")&IF(H2,H$1&"
","")&IF(I2,I$1&" ","")&IF(J2,J$1&" ",""))

"Paulc" wrote:

Using XL 2000

I have a worksheet which contains 10 columns A:J and over 500 lines.
The data in each cell in the Column range E:J contains either a TRUE or FALSE.

Row 1 contains header labels for each column.

Im looking for a routine to loop through each column, per line and where a
TRUE exists in that column, and ( where more than one TRUE is found)
concatenate the label name in to column K of the same row being checked.

Hope this makes sense.
Ideas appreciated. Thanks, Paul