Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Is there a way of grabbing the values of a range of cells and assignin them to a string vairable. For example if I had RED, BLUE, WHITE in cells A1 to A3 respectively how could I get my variable strColors=RedBlueWhite I have tried strColors=Range("A1:A3").value and that obviously did no work. Assistance Appreciated -- mozar ----------------------------------------------------------------------- mozart's Profile: http://www.excelforum.com/member.php...fo&userid=1331 View this thread: http://www.excelforum.com/showthread.php?threadid=53311 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Mozart,
I hope this will be music to you ... Sub RWB() Dim RWB As String RWB = Range("A1").Value & Range("A2").Value & Range("A3").Value End Sub HTH Cheers Carim |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Yes that would seem the way to do it but it could become painful if say your range was say 50 cells let alone 62k. Thanks -- mozart ------------------------------------------------------------------------ mozart's Profile: http://www.excelforum.com/member.php...o&userid=13314 View this thread: http://www.excelforum.com/showthread...hreadid=533112 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub RWB()
Dim RWB As String Dim i As Integer For i = 1 To 50 RWB = RWB & Range("A" & i).Value Next i End Sub All the Best Carim |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Would this work for you using the later versions of Excel.
This demo starts at Cell A1 for a size of 50. Sub Demo() Dim Str As String Dim n As Long n = 50 Str = Join(WorksheetFunction.Transpose(Range("A1").Resiz e(n)), vbNullString) End Sub -- HTH. :) Dana DeLouis Windows XP, Office 2003 "mozart" wrote in message ... Yes that would seem the way to do it but it could become painful if say your range was say 50 cells let alone 62k. Thanks -- mozart ------------------------------------------------------------------------ mozart's Profile: http://www.excelforum.com/member.php...o&userid=13314 View this thread: http://www.excelforum.com/showthread...hreadid=533112 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Thanks Dana. That works nicel -- mozar ----------------------------------------------------------------------- mozart's Profile: http://www.excelforum.com/member.php...fo&userid=1331 View this thread: http://www.excelforum.com/showthread.php?threadid=53311 |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi Mozart, I hope this will be music to you ... Sub RWB() Dim RWB As String RWB = Range("A1").Value & Range("A2").Value & Range("A3").Value End Sub HTH Cheers Carim -- Carim ------------------------------------------------------------------------ Carim's Profile: http://www.excelforum.com/member.php...o&userid=33259 View this thread: http://www.excelforum.com/showthread...hreadid=533112 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA: Matching cells across columns, and returning equal values | Excel Discussion (Misc queries) | |||
setting multiple cells equal to other cells | Excel Worksheet Functions | |||
Setting Cells Equal only if Destination Cell Does Not Have a Formu | Excel Discussion (Misc queries) | |||
Formula to find equal values with blank cells | Excel Discussion (Misc queries) | |||
string values do not equal cells, then return msg | Excel Programming |