Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Assign value to variable
Several people have helped me get to the stage where I've got the following formulae working: Range("B6").Formula = "=max(h1:h300)" Range("B7").Formula = "=(CELL("address",OFFSET(h1,MATCH(MAX(h1:h300),h1: h300,0)-1,0)))" Range("B8").Formula = "=ROW(OFFSET(A1,COUNTA(A:A)-1,0))" next question is for my 3 formulae, how do i set a variable to equal each of those values for writing to a sequential text file? TIA, Rob -- rroach ------------------------------------------------------------------------ rroach's Profile: http://www.excelforum.com/member.php...o&userid=21093 View this thread: http://www.excelforum.com/showthread...hreadid=386677 |
#2
|
|||
|
|||
Did you mean assign the three values to one variable like this:
Dim myVar as String myVar = Range("B6").Value &"," &Range("B7").Value &"," &Range("B8").Value or assign each value to a different variable like this: Var1 = Range("B6").Value Var2 = Range("B7").Value Var3 = Range("B8").Value Hope this helps Rowan "rroach" wrote: Several people have helped me get to the stage where I've got the following formulae working: Range("B6").Formula = "=max(h1:h300)" Range("B7").Formula = "=(CELL("address",OFFSET(h1,MATCH(MAX(h1:h300),h1: h300,0)-1,0)))" Range("B8").Formula = "=ROW(OFFSET(A1,COUNTA(A:A)-1,0))" next question is for my 3 formulae, how do i set a variable to equal each of those values for writing to a sequential text file? TIA, Rob -- rroach ------------------------------------------------------------------------ rroach's Profile: http://www.excelforum.com/member.php...o&userid=21093 View this thread: http://www.excelforum.com/showthread...hreadid=386677 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? | Excel Worksheet Functions | |||
How do I assign a text value to a variable number of rows? | Excel Worksheet Functions | |||
Variable VB to assign new sheet name | Excel Worksheet Functions | |||
How can I assign a range starting cell based on a variable locati. | Excel Discussion (Misc queries) | |||
How can I assign a range starting cell based on a variable locati. | Excel Worksheet Functions |