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

  • Thread starter Thread starter JasonK
  • Start date Start date
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...
 
Hi Jason,

Try something like:

Dim Rng As Range

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

Rng.Value = x
 
Back
Top