text separated by commas

  • Thread starter Benjamin Barreto
  • Start date
B

Benjamin Barreto

Hi, I Hope you can help me with this:

If I have a row full of data(False or True text) in every
column and I want to put in one cell the number of the
colums when is true separated by commas.

For example:
A B C D ......
TRUE FALSE TRUE TRUE

by any formula what I need is the number of the columns
separated by commas all in one cell

1,3,4


Thanks
 
D

Don Guillett

something like this macro

Sub stringtrue()
For Each c In Range("a13:g13")
If UCase(c) = "TRUE" Then mstr = mstr & c.Column & ","
Next
MsgBox mstr
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top