Assign value to variable

R

rroach

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top