#1   Report Post  
Posted to microsoft.public.excel.programming
tim tim is offline
external usenet poster
 
Posts: 105
Default cell values

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default cell values

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



"Tim" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
tim tim is offline
external usenet poster
 
Posts: 105
Default cell values


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



"Tim" wrote in

message
...
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



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
N10 N10 is offline
external usenet poster
 
Posts: 141
Default cell values

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





















"Tim" wrote in message
...
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



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.772 / Virus Database: 519 - Release Date: 01/10/2004


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VLookup multiple values - sum returned values into single cell se7098 Excel Worksheet Functions 12 April 2nd 23 07:32 PM
Copy values from a cell based on values of another cell Spence10169 Excel Discussion (Misc queries) 4 January 13th 09 10:01 AM
How to assign values to a cell based on values in another cell? Joao Lopes Excel Worksheet Functions 1 December 5th 07 09:02 PM
Search/Filter to find values in another range based on two cell values Andy Excel Programming 2 April 29th 04 04:08 PM


All times are GMT +1. The time now is 12:21 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"