Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Storing Rows.Value in a single variable

Is it possible to store the values in a range as a single variable using
something like Test = Rows(a&":"&B).Value? This line of code doesn't work
but I would like to see if something like it is possible. What I have is a
range of values that can change based on an input from another Sub.
Basically the sheet contains info for customers. One sub goes through and
finds out what customer to look for. Then it goes through the sheet I want
to get the values for, sorts by client, and then selects all rows that have
information on that client. I would then like to store that as a variable to
be sent to another program. Am I asking for to much to store this info in a
sole variable? Would I need to create an array for each column and then call
it back from the array? Thanks.

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200810/1

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Storing Rows.Value in a single variable

Sub dural()
Set r = Range("A1:B9")
v = ""
For Each rr In r
v = v & rr.Value
Next
End Sub

You can also put a marker character between each record if desired.
--
Gary''s Student - gsnu2007k


"Jim via OfficeKB.com" wrote:

Is it possible to store the values in a range as a single variable using
something like Test = Rows(a&":"&B).Value? This line of code doesn't work
but I would like to see if something like it is possible. What I have is a
range of values that can change based on an input from another Sub.
Basically the sheet contains info for customers. One sub goes through and
finds out what customer to look for. Then it goes through the sheet I want
to get the values for, sorts by client, and then selects all rows that have
information on that client. I would then like to store that as a variable to
be sent to another program. Am I asking for to much to store this info in a
sole variable? Would I need to create an array for each column and then call
it back from the array? Thanks.

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200810/1


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
Storing a value to variable CLamar Excel Discussion (Misc queries) 0 June 16th 06 04:46 PM
Storing variable in Option.Tag augustus Excel Programming 0 February 4th 05 02:45 AM
Storing a range in a variable Mick[_8_] Excel Programming 6 January 15th 05 09:36 PM
Storing value in a variable from a cell Saadi Excel Programming 6 January 8th 05 01:27 PM
Storing a Macro name in a Variable Jack Adams Excel Programming 2 October 5th 04 03:59 PM


All times are GMT +1. The time now is 01:00 AM.

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

About Us

"It's about Microsoft Excel"