ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Macro? or?? (https://www.excelbanter.com/excel-discussion-misc-queries/208548-macro.html)

IConsultIT

Macro? or??
 
I realize that this may seem like a silly question...so be it. I'm trying to
create a macro that will perform the following keystrokes; "F2" or edit,
"Home" and "Delete". What is the best way to do this?

Thank you,

--
David W. Heiman

Bob I

Macro? or??
 
Yes, record a Macro

IConsultIT wrote:
I realize that this may seem like a silly question...so be it. I'm trying to
create a macro that will perform the following keystrokes; "F2" or edit,
"Home" and "Delete". What is the best way to do this?

Thank you,



IConsultIT

Macro? or??
 
Bob,

I tried that several times and it did not record the key strokes. It merely
moved what was in the first cell to the sub-sequent cells.
--
David W. Heiman


"Bob I" wrote:

Yes, record a Macro

IConsultIT wrote:
I realize that this may seem like a silly question...so be it. I'm trying to
create a macro that will perform the following keystrokes; "F2" or edit,
"Home" and "Delete". What is the best way to do this?

Thank you,




IConsultIT

Macro? or??
 
Apparently as soon as I hit "F2" it pauses the recording and does not record
the "F2""Home""Delete" sequence.
--
David W. Heiman


"IConsultIT" wrote:

Bob,

I tried that several times and it did not record the key strokes. It merely
moved what was in the first cell to the sub-sequent cells.
--
David W. Heiman


"Bob I" wrote:

Yes, record a Macro

IConsultIT wrote:
I realize that this may seem like a silly question...so be it. I'm trying to
create a macro that will perform the following keystrokes; "F2" or edit,
"Home" and "Delete". What is the best way to do this?

Thank you,




Harald Staff[_2_]

Macro? or??
 
Hi David

That is not the way Excel macros work. Compare

Click cell A1
Click the 1 key on the keyboard
Click the 2 key on the keyboard
Click the Enter key on the keyboard

to

Range("A1").Value = 12

HTH. Best wishes Harald

"IConsultIT" wrote in message
...
I realize that this may seem like a silly question...so be it. I'm trying
to
create a macro that will perform the following keystrokes; "F2" or edit,
"Home" and "Delete". What is the best way to do this?

Thank you,

--
David W. Heiman



Bob I

Macro? or??
 
Based on what you appear to expect to happen, use this

Sub Macro1()
ActiveCell.FormulaR1C1 =
Right(ActiveCell.FormulaR1C1,Len(ActiveCell.Formul aR1C1) - 1)
End Sub

Watch the wrap, there only 1 statement line.


IConsultIT wrote:

Apparently as soon as I hit "F2" it pauses the recording and does not record
the "F2""Home""Delete" sequence.




All times are GMT +1. The time now is 10:46 PM.

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