I need data to copy to the next available cell in a column from a macro

J

JasonK

TIA -

I've got a macro that will find solutions to a math problem. The same
macro runs several for/next loops searching for numbers that match
criteria for solutions. Most of these loops find multiple solutions.
How do I make the numbers go to the next blank cell in a column?

Say for example the macro finds 25 and 40 are solutions. In the macro,
the solution is temporarily held as variable x. I need 25 to be in
say, A1 and 40 to be in A2, etc...
 
N

Norman Jones

Hi Jason,

Try something like:

Dim Rng As Range

Set Rng = Cells(Rows.Count, "A").End(xlUp)(2)

Rng.Value = x
 

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