Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Storing a value to variable | Excel Discussion (Misc queries) | |||
Storing variable in Option.Tag | Excel Programming | |||
Storing a range in a variable | Excel Programming | |||
Storing value in a variable from a cell | Excel Programming | |||
Storing a Macro name in a Variable | Excel Programming |