Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 47
Default Insert selected cell value into next cell in range that is empty

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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default Insert selected cell value into next cell in range that is empty

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

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Guy" wrote in message
...
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


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 47
Default Insert selected cell value into next cell in range that is emp

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?

"Don Guillett" wrote:

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

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Guy" wrote in message
...
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



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 47
Default Insert selected cell value into next cell in range that is emp

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

"Don Guillett" wrote:


try
ActiveCell.Copy Cells(nar, "d")


Cells(nar, "d").value=ActiveCell.value

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Guy" wrote in message
...
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?

"Don Guillett" wrote:

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

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Guy" wrote in message
...
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






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default Insert selected cell value into next cell in range that is emp


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

"Guy" wrote in message
...
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

"Don Guillett" wrote:


try
ActiveCell.Copy Cells(nar, "d")


Cells(nar, "d").value=ActiveCell.value

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Guy" wrote in message
...
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?

"Don Guillett" wrote:

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

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Guy" wrote in message
...
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





  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 47
Default Insert selected cell value into next cell in range that is emp

Thanks Don,
That is perfect.
Thanks a bunch,
Guy

"Don Guillett" wrote:


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

"Guy" wrote in message
...
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

"Don Guillett" wrote:


try
ActiveCell.Copy Cells(nar, "d")

Cells(nar, "d").value=ActiveCell.value

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Guy" wrote in message
...
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?

"Don Guillett" wrote:

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

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Guy" wrote in message
...
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






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Selected Cell in a Range Appears in another Cell Nick'o Excel Worksheet Functions 1 August 25th 07 08:26 AM
Insert Current Date when cell is empty?? Dazed&confused! Excel Worksheet Functions 4 February 7th 07 09:18 AM
Insert and sum in empty cell salsal Excel Worksheet Functions 4 July 5th 06 04:17 PM
Need a insert a empty cell if compare different function saici Excel Discussion (Misc queries) 2 June 9th 06 08:18 AM
how do I insert the address of a selected cell into a fixed cell cox Excel Discussion (Misc queries) 2 May 27th 06 07:44 PM


All times are GMT +1. The time now is 02:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"