ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Concatenate non-concurrent cells (https://www.excelbanter.com/excel-programming/395601-concatenate-non-concurrent-cells.html)

[email protected]

Concatenate non-concurrent cells
 
I would like to know how I can take different cells (non concurrent)
and string them together in another cell with separators. The
CONCATENATE function can't do this. The end result that I am looking
for is to select a number of cells using a userform and listbox with
checkboxes, and have all of those values combine and be pasted into a
cell of my choosing. I have the userform, the listbox, and the
checkboxes (courtesy of John Walkenbach's book), I need to figure out
how to combine my selections into a single cell.

Thanks for your reponses in advance.


Shane


joel

Concatenate non-concurrent cells
 
Concatenate should do what you are asking. Can you give an example of the
data you are trying to concatenate and the results? Also show what incorrect
results you are getting.

" wrote:

I would like to know how I can take different cells (non concurrent)
and string them together in another cell with separators. The
CONCATENATE function can't do this. The end result that I am looking
for is to select a number of cells using a userform and listbox with
checkboxes, and have all of those values combine and be pasted into a
cell of my choosing. I have the userform, the listbox, and the
checkboxes (courtesy of John Walkenbach's book), I need to figure out
how to combine my selections into a single cell.

Thanks for your reponses in advance.


Shane



Shane

Concatenate non-concurrent cells
 
I should have been more specific. I would like to have them divided by
commas. I have found a few functions where I can put commas in, but if
I choose cells that are non-concurrent I get a #VALUE error.


Bob Phillips

Concatenate non-concurrent cells
 
=A1&","&B1&","&C1

etc.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Shane" wrote in message
oups.com...
I should have been more specific. I would like to have them divided by
commas. I have found a few functions where I can put commas in, but if
I choose cells that are non-concurrent I get a #VALUE error.




Shane

Concatenate non-concurrent cells
 
I would like to add to vba code so I can string together cell
selections chosen using checkboxes from a listbox in a userform


Gord Dibben

Concatenate non-concurrent cells
 
See one answer with a macro in excel.newusers

No listboxes, just select the cells from the worksheet.


Gord Dibben MS Excel MVP

On Wed, 15 Aug 2007 21:56:04 -0000, Shane wrote:

I would like to add to vba code so I can string together cell
selections chosen using checkboxes from a listbox in a userform



Bob Phillips

Concatenate non-concurrent cells
 
So it is just

myVar = If Checkbox1.Value Then Range"A1").Value & ","
myVar = myVar & If Checkbox2.Value Then Range"B1").Value & ","
myVar = myVar & If Checkbox3.Value Then Range"C1").Value & ","
'etc.
myVar = Left$(myVar,Len$(myVar)-1)

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Shane" wrote in message
ups.com...
I would like to add to vba code so I can string together cell
selections chosen using checkboxes from a listbox in a userform





All times are GMT +1. The time now is 10:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com