Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Doris,
Am happy to hear that you got it to work! You are very Welcome! keep on Exceling... -- steveB Remove "AYN" from email to respond "DorisM" wrote in message ... Hi Steve; Thank you for your help. I modify the code to what I needed to do in my program and it works. DorisM "STEVE BELL" wrote: This code will check column A, rows 1 to 25 and make a string see if this helps... ================================= Sub StringCreat() Dim rw As Long, str As String For rw = 1 To 25 If Len(Cells(rw, 1)) 0 Then If Len(str) 0 Then str = str & ", " & Cells(rw, 1).Text Else str = Cells(rw, 1).Text End If End If Next MsgBox str End Sub ==================================== -- steveB Remove "AYN" from email to respond "DorisM" wrote in message ... New to VBA so I'm not sure if this is possible. In a program, I'm trying to concatenate string variables with comma after each variable, but the number of occurrences of string variable can be different from time to time. ???? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
logical test and concatenate(string) | Excel Discussion (Misc queries) | |||
Concatenate in a string | Excel Worksheet Functions | |||
Opposite of Concatenate (Breaking apart a string) | Excel Worksheet Functions | |||
superscript in part of a string when using concatenate | Excel Discussion (Misc queries) | |||
concatenate a text string if two different cells contain the sam. | Excel Worksheet Functions |