Insert selected cell value into next cell in range that is empty

  • Thread starter Thread starter Guy
  • Start date Start date
G

Guy

Hi Ya'll,
I need a macro that will insert the selected cell value into "D2", or if
not empty, the next cell in range (D2:D65) that is empty.

Thanks for all the help everyone has given me.
Guy
 
One way
Sub copyactivecelltonextcellincold()
x = Cells(Rows.Count, "D").End(xlUp).Row
nar = Range("d1:d" & x).Find("").Row
ActiveCell.Copy Cells(nar, "d")
End Sub
 
Hi Don,
That kinda works the way I want. How can I get it to just insert the cell
'Value' of the selected cell without reformatting the cell or inserting any
Forms object from the selected cell?
 
Hi Don,
That worked great. I have also tried to use it on something else just
slightly different but I can't get it to work. This is what I am trying to
use:

Sub b01AddNext()
x = Cells(Rows.Count, "E").End(xlUp).Row
nar = Range("E2:E" & x).Find("Bye").Row
Cells(nar, "E").Value = Cell("B3").Value
End Sub

If I change *Cell("B3").Value back to *ActiveCell.Value it works but when
I use it as currently shown it gives me a Compile error "Sub or Function not
defined". Probalby just something simple I just can't figure out. I need it
to insert the "B3" value regardless of which cell is sellected in this
instance. Please help.

Thanks,
Guy
 
You can write
range("b3")
or
cells(3,"b")
but not what you did
 
Thanks Don,
That is perfect.
Thanks a bunch,
Guy

Don Guillett said:
You can write
range("b3")
or
cells(3,"b")
but not what you did
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(e-mail address removed)
 

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

Back
Top