ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Macro to transfer contents of 'Selected' cell to alternate cell. (https://www.excelbanter.com/excel-worksheet-functions/214322-macro-transfer-contents-selected-cell-alternate-cell.html)

Gryndar

Macro to transfer contents of 'Selected' cell to alternate cell.
 
I need a macro that will transfer contents of a cell that is currently
'selected / highlighted' to another cell, and if that cell is not blank then
to transfer the contents of the 'selected' cell to an alternate cell.
Merry Christmas Everyone!

Thanks,
Guy

Gryndar

Macro to transfer contents of 'Selected' cell to alternate cell.
 
The transfer would be initiated by clicking on a button that the macro would
be assigned to.

"Gryndar" wrote:

I need a macro that will transfer contents of a cell that is currently
'selected / highlighted' to another cell, and if that cell is not blank then
to transfer the contents of the 'selected' cell to an alternate cell.
Merry Christmas Everyone!

Thanks,
Guy


muddan madhu

Macro to transfer contents of 'Selected' cell to alternate cell.
 
try this
Create a button using forms and assign this macro

Sub test()
Selection.Copy
ActiveCell.Offset(0, 1).Select
ActiveSheet.Paste
Application.CutCopyMode = False
End Sub


On Dec 20, 7:52*am, Gryndar wrote:
The transfer would be initiated by clicking on a button that the macro would
be assigned to.

"Gryndar" wrote:
I need a macro that will transfer contents of a cell that is currently
'selected / highlighted' to another cell, and if that cell is not blank then
to transfer the contents of the 'selected' cell to an alternate cell.
Merry Christmas Everyone!


Thanks,
Guy



Gord Dibben

Macro to transfer contents of 'Selected' cell to alternate cell.
 
Best to stick with one thread.

See replies to your first posting.


Gord Dibben MS Excel MVP

On Fri, 19 Dec 2008 18:48:01 -0800, Gryndar
wrote:

I need a macro that will transfer contents of a cell that is currently
'selected / highlighted' to another cell, and if that cell is not blank then
to transfer the contents of the 'selected' cell to an alternate cell.
Merry Christmas Everyone!

Thanks,
Guy



Gryndar

Macro to transfer contents of 'Selected' cell to alternate cel
 
That does not work. It only transfers info to adjacent cell. I need to
transfer contents from a currently sellected cell to a particular cell, (In
this case from whatever cell is sellected to C2 if blank or C3 if not blank).

"muddan madhu" wrote:

try this
Create a button using forms and assign this macro

Sub test()
Selection.Copy
ActiveCell.Offset(0, 1).Select
ActiveSheet.Paste
Application.CutCopyMode = False
End Sub


On Dec 20, 7:52 am, Gryndar wrote:
The transfer would be initiated by clicking on a button that the macro would
be assigned to.

"Gryndar" wrote:
I need a macro that will transfer contents of a cell that is currently
'selected / highlighted' to another cell, and if that cell is not blank then
to transfer the contents of the 'selected' cell to an alternate cell.
Merry Christmas Everyone!


Thanks,
Guy




Gryndar

Macro to transfer contents of 'Selected' cell to alternate cel
 
To start with I want to thank everyone who has contributed to this, THANKS,
ya'll are great!
After trying all the formulas and noticing what each did I figured I could
combined a couple suggestions to get it to work. I used the original formula
from Luke M:
Sub CheckCell()
If Range("A2").Value = "" Then
Range("A2").Value = Range("C2").Value
Else
Range("A3").Value = Range("C2").Value
End If

End Sub
And substituted [Range("C2").Value] with [ActiveCell.Value] and it works
perfectly. I probably have just not been explaining it good enough to begin
with, sorry about that. The original formula almost worked but I didn't know
the syntax for using the sellected cell instead of 'C2' and couldn't figure
it out till the post by muddan madhu. His formula was not what I was looking
for but when I saw the syntax "ActiveCell" I figured maybe I could use that,
and it worked. I have learned a lot about these formulas from all this and
should be able to figure out some other stuff I have been wondering about
with this stuff.
Thanks a bunch everyone, ya'll have all been really great, I'm just not that
good at explaining sometimes.

MERRY CHRISTMAS!

"Gord Dibben" wrote:

Best to stick with one thread.

See replies to your first posting.


Gord Dibben MS Excel MVP

On Fri, 19 Dec 2008 18:48:01 -0800, Gryndar
wrote:

I need a macro that will transfer contents of a cell that is currently
'selected / highlighted' to another cell, and if that cell is not blank then
to transfer the contents of the 'selected' cell to an alternate cell.
Merry Christmas Everyone!

Thanks,
Guy




Gord Dibben

Macro to transfer contents of 'Selected' cell to alternate cel
 
If you had watched your original posting you would have seen my reply about
using the "Activecell"


Gord

On Sat, 20 Dec 2008 09:58:01 -0800, Gryndar
wrote:

To start with I want to thank everyone who has contributed to this, THANKS,
ya'll are great!
After trying all the formulas and noticing what each did I figured I could
combined a couple suggestions to get it to work. I used the original formula
from Luke M:
Sub CheckCell()
If Range("A2").Value = "" Then
Range("A2").Value = Range("C2").Value
Else
Range("A3").Value = Range("C2").Value
End If

End Sub
And substituted [Range("C2").Value] with [ActiveCell.Value] and it works
perfectly. I probably have just not been explaining it good enough to begin
with, sorry about that. The original formula almost worked but I didn't know
the syntax for using the sellected cell instead of 'C2' and couldn't figure
it out till the post by muddan madhu. His formula was not what I was looking
for but when I saw the syntax "ActiveCell" I figured maybe I could use that,
and it worked. I have learned a lot about these formulas from all this and
should be able to figure out some other stuff I have been wondering about
with this stuff.
Thanks a bunch everyone, ya'll have all been really great, I'm just not that
good at explaining sometimes.

MERRY CHRISTMAS!

"Gord Dibben" wrote:

Best to stick with one thread.

See replies to your first posting.


Gord Dibben MS Excel MVP

On Fri, 19 Dec 2008 18:48:01 -0800, Gryndar
wrote:

I need a macro that will transfer contents of a cell that is currently
'selected / highlighted' to another cell, and if that cell is not blank then
to transfer the contents of the 'selected' cell to an alternate cell.
Merry Christmas Everyone!

Thanks,
Guy





Gryndar

Macro to transfer contents of 'Selected' cell to alternate cel
 
Sorry about that, I apologise. Been kinda hectic lately but no excuse. Sorry
and Thanks a bunch for all your help.
Merry Christmas!
Guy

"Gord Dibben" wrote:

If you had watched your original posting you would have seen my reply about
using the "Activecell"


Gord

On Sat, 20 Dec 2008 09:58:01 -0800, Gryndar
wrote:

To start with I want to thank everyone who has contributed to this, THANKS,
ya'll are great!
After trying all the formulas and noticing what each did I figured I could
combined a couple suggestions to get it to work. I used the original formula
from Luke M:
Sub CheckCell()
If Range("A2").Value = "" Then
Range("A2").Value = Range("C2").Value
Else
Range("A3").Value = Range("C2").Value
End If

End Sub
And substituted [Range("C2").Value] with [ActiveCell.Value] and it works
perfectly. I probably have just not been explaining it good enough to begin
with, sorry about that. The original formula almost worked but I didn't know
the syntax for using the sellected cell instead of 'C2' and couldn't figure
it out till the post by muddan madhu. His formula was not what I was looking
for but when I saw the syntax "ActiveCell" I figured maybe I could use that,
and it worked. I have learned a lot about these formulas from all this and
should be able to figure out some other stuff I have been wondering about
with this stuff.
Thanks a bunch everyone, ya'll have all been really great, I'm just not that
good at explaining sometimes.

MERRY CHRISTMAS!

"Gord Dibben" wrote:

Best to stick with one thread.

See replies to your first posting.


Gord Dibben MS Excel MVP

On Fri, 19 Dec 2008 18:48:01 -0800, Gryndar
wrote:

I need a macro that will transfer contents of a cell that is currently
'selected / highlighted' to another cell, and if that cell is not blank then
to transfer the contents of the 'selected' cell to an alternate cell.
Merry Christmas Everyone!

Thanks,
Guy






All times are GMT +1. The time now is 02:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com