I got help here before with my script, but i am still tuning it, and i have a simple question i think, how can i prevent writing to cells, and instead keep everything in variables?

Range("K11:L11").Value = .LinEst(rng1y, rng1x)

There is an example, i would like to write the result in 2 variables, and not K11, L11.

I have tried many things, but i canīt figure out how to do it.

I was thinking that rng1y and rng1x should work, i mean, it writes from them.

But i canīt use them for some reason, not sure why. Maybe i need to convert them or something.