cell values

  • Thread starter Thread starter Tim
  • Start date Start date
T

Tim

Hello,

I need to create a single string based on 15 individual
cells. Each cell has a unique value that will come
together to form an account number. Is there a simple or
efficient way to do this. The range "A1:O1" should look
like 123456789012345.

Thanks
 
Hi Tim,

Sub Tester01()
Dim RCell As Range
Dim sStr As String

For Each RCell In Range("A1:O1")
sStr = sStr & RCell.Value
Next
MsgBox sStr
End Sub
 
Briliant......thank you!!!

-----Original Message-----
Hi Tim,

Sub Tester01()
Dim RCell As Range
Dim sStr As String

For Each RCell In Range("A1:O1")
sStr = sStr & RCell.Value
Next
MsgBox sStr
End Sub


---
Regards,
Norman






.
 
HelloTim


Will this do it seems to work when I run it

Sub CELLNUMBERS()

Application.ScreenUpdating = False

Dim myrange As Range
Dim mystring As String

Range("A1:O1").Select

Set myrange = Selection
For Each Cell In myrange
mystring = mystring & Cell.Value
Next
Range("A6").Select
Application.ScreenUpdating = True

With ActiveCell
.Value = mystring
.NumberFormat = "0"
End With

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

Back
Top