Repeat Code Repetitive Actions?

I am doing some list comparing and I have to do a lot of the same actions 
(specifically, highlight three cells, insert, shift cells down) 

Is there a way I can code that action into a shortcut key?
0
Chris6982 (632)
2/18/2005 4:31:13 PM
excel.misc 78881 articles. 5 followers. Follow

2 Replies
223 Views

Similar Articles

[PageSpeed] 32

Check out the Help info on Recording Macros. They can have shortcut keys 
assigned to them and can also be attached to custom toolbar button & command 
buttons, and can be added to your Menu.

Good Luck |:>)

"chris" wrote:

> I am doing some list comparing and I have to do a lot of the same actions 
> (specifically, highlight three cells, insert, shift cells down) 
> 
> Is there a way I can code that action into a shortcut key?
0
CyberTaz (411)
2/18/2005 6:01:03 PM
Just to add to CyberTaz's reply.

When you turn on the record macro stuff, you'll be prompted for a name (and
where to save it) and if you want a shortcut key.

If you forget to assign the shortcut key here, you can assign it later:
tools|macro|macros
select your macro
Options button
and assign it there.

And you'll see a toolbar pop up.  One of those icons on that toolbar allows you
to use Relative references.  This means that the actions will be taken with
respect to the activecell.

If you don't toggle that option, your macro will get recorded using the actual
address of the cell you're working on.

If you run a macro like that, you'll do the same thing over and over and over to
the same cell.

If you have trouble fixing up your code, paste it (just the code, not the
workbook) into your follow up message.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

chris wrote:
> 
> I am doing some list comparing and I have to do a lot of the same actions
> (specifically, highlight three cells, insert, shift cells down)
> 
> Is there a way I can code that action into a shortcut key?

-- 

Dave Peterson
0
ec357201 (5290)
2/18/2005 11:30:35 PM
Reply:

Similar Artilces:

Transaction coding style
Hi Am trying to code correct and are wondering which of these code blocks are the most right. Thanks --Version 1: BEGIN TRY BEGIN TRANSACTION DELETE FROM dbo.Address WHERE UserId = @userid; IF(@@ROWCOUNT = 0) BEGIN IF(@@TRANCOUNT > 0) ROLLBACK TRANSACTION; SET @statuscode = 20; RETURN; END SET @statuscode = 100; COMMIT TRANSACTION; END TRY BEGIN CATCH IF(@@TRANCOUNT > 0)ROLLBACK TRANSACTION; EXEC dbo.Error_ErrorHandler; SET @statuscode =...

Repeating cell-contents
A1 contains "Smith" A53 contains "Jones" A459 contains "Smith" A1072 contains "Peterson" A23405 contains "Smith" A45234 contains "Samantha" What formula can I use to put: "Smith" in B1 thru B52 blanks in B53 thru B458 "Smith" in B459 thru B1071 blanks in A1072 thru B23404 "Smith" in A23405 thru B45233 blanks in A45234 thru A65536 Thanks, Gary Hi Gary try the following: In B1 enter =A1 in B2 enter =IF(A2="",B1,IF(B1="",A2,"")) and ...

Printing a Repeated Section Messege like "Continued"
Setting the repeated section property in a report (Access 2007) to Yes, writes the section Heading on the next page when the detail section is not complete at the page break. I would like the bottom of the first page to print "Continued on Next Page" and/or the top of the second page to say "Continued from ...)" so the report reader knows the details are part of the previous section on the previous page, and not in an entriely new section of the report. Can this be done dynamically in a report, since some pages naturally break when a section ends and other pag...

Access 97- if... and if... then Coding
I usea form with check boxes. I have code that If one box is checked Then change a list to "1" Private Sub XXX_AfterUpdate() If (Me.XXX = -1) Then Me.List117 = "1" End If I want to write a code that if two (or more) boxes are checked Then change list to 2 Private Sub XXX_AfterUpdate() If (Me.XXX = -1) and If (If Me.YYY = -1 ) Then Me.List117 = "2" End If I would appreciate any help. Have you checked Access HELP for the syntax on the If...Then function? Perhaps: If (Me!XXX = -1) And (Me!YYY = -1) Then 'do this Else 'do that ...

Repeating rows dont repeat fully when columns also repeat
I am repeating rows 1 through 4 and columns A through D. At least that is what I'm trying to do. On page two, the columns repeat but then the rows do not (beyond columns A through D). Is there a way to make it so that they both repeat? In re-reading the above, I'm not sure I'm making myself clear. Assume that XX's represent the repeating rows and ZZ's represent the repeating columns. This is what I'd like to see: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ZZZZZZZZZZZ YYYYYYYYYYYYYYYYYYYYYY ZZZZZ...

CRM 1.2 update for Action Pack subscribers?
I received CRM v1.0 as a part of the Microsoft Action Pack. I am using Server 2003 and am therefore anticipating CRM v1.2. Will I be able to download the update or will I need to wait for my next Action Pack update to receive it? Michael Carr Michael, I'm not familiar with how Action Pack updates are distributed. Do they typically allow you to download them? If so, then you should be able to get CRM 1.2 from that same location. If you need to wait for an update, then I'm sure that's the way it will work for this. "Michael Carr" <mcarr@umich.edu> wrote i...

random numbers, how can you utilize it without repeating them
How can you use random numbers without repeating them on a worksheet? The way it is set up now is, example: =RANDBETWEEN(1,8) I would like to be able to use the random between but I don't want the numbers to repeat themselves within the worksheet. Any suggestions or Ideas? http://www.mcgimpsey.com/excel/udfs/randint.html -- Regards, Peo Sjoblom (No private emails please) "RS" <RS@discussions.microsoft.com> wrote in message news:75427E72-3EAA-4105-A65B-53F0F1213414@microsoft.com... > How can you use random numbers without repeating them on a worksheet? The >...

repeating cells in footer in excel
I need prepare a form with many lines. In this form I need to provide a footer (with a group of cells) for approvement. Even I can select cells to repeat in every page header there is no such a feature for footers. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http:...

Repeats
On one of my worksheets I type the day of the week in the first column, followed by the date in the second column etc. Since the current entry is in line 3,675th when I typed the first letter of the day the rest was completed automatically. E.g. If I typed M then onday followed, as were entries of the same gist in other columns, when the first word of the information was typed. Suddenly this stopped. Why I have no idea, but would appreciate if someone told me how to restore this time and typing savings. Thanks! Tools>Options>Edit, check that Enable Autocomplete for Cell Values i...

how is .Net code always cross platform? #2
Hi all 1.How is .NET code always cross platform? 2.Is it possible to use dll created by sing VC++ 6.0 into VC++.NET? How is the backward compatibility possible? Regards bhargav "bhag" <bhag281@gmail.com> wrote in message news:1154940168.899645.296820@h48g2000cwc.googlegroups.com... > Hi all > > 1. How is .NET code always cross platform? It isn't. >2. Is it possible to use dll created by sing VC++ 6.0 into VC++.NET? Yes. http://www.codeproject.com/dotnet/DynamicDllImport.asp > How is the backward compatibility possible? Except for that C++ h...

allowing for repeating bank entries
Many customers have the same electronic payments coming out of their accounts every month. It would be very helpful if they could create either recurring batches or repeating transactions so they didn't have to do this same data entry every month. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I...

Append and Loop Code
I am trying to create a code that will go through a table of criteria. It will run a query for a row, append that query to an output table, and then move down a row and do the same thing over until there are no rows left. Example of Criteria_Table: Fields are - AutoID: Name : Level : Location 456 : Joe : Level 1 : East 524 : Sam : Level 3 : West 789 : Bob : Level 10 : North Example of Criteria_Qry (Criteria_Table linked Position_Table) Fields are - Name : Level : Location : Position_Num Example of Ouput_Table Fields are - Name : Level : Location : Position_Num ...

repeat last step #3
THANKS!!! I will try these techs out....and let you know how it goes.. -- alexshield ----------------------------------------------------------------------- alexshields's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1404 View this thread: http://www.excelforum.com/showthread.php?threadid=26487 ...

repeat if
There are two columns A1:A25 and B1:B25. The information in column A are dates. The information in column B are descriptions of activity performed on the date in the adjacent cell. If the same date is inserted into A1, A2 and A3 can the description manually typed into B1 be automatically added to B2 and B3? Added based on repeated and grouped cells in column A. Regards, Gary Try this in B2, and copy down as needed: =IF(A2=A1,B1,"") -- HTH, RD --------------------------------------------------------------------------- Please keep all correspondence within the NewsGroup...

Replicator ID Coding
I am having a problem with Invalid Data type when trying to add a new record with a ReplicatorID in it. I get a Data Type Converion Error. rs!TankID = CStr(Forms![TankInfo]![TankID]) or rs!TankID = Forms![TankInfo]![TankID] Both statements give me the same error. TankID is a ReplicatorID, if I display the field TankID it shows {000001CF-0000-0000-0000-000000000000} Very confusing. Thank you in advance for your help, Mike "Michael Kintner" <nospam@nospam.com> wrote in news:12ubbjm24a6jn15@corp.supernews.com: > I am having a problem with Invalid D...

Repeat DVD
I have a DVD with just one title only 8mins long. I wish to play it continuously on my laptop, but cannot configure WMP to do this. Is it possible? ...

Repeated values in form fields.
I have created a long legal form template for our workers. Data the worker enters in the beginning of the form has to be entered in several other places in the document. An example is the defendent's name. It currently has to be entered 7 times into fields on the form. Is there a way to have the six lower fields take the information from the first field where the data is entered. If I can figure this one out, I'll save dozens of worker hours per year. Thanks, Lee -- Lee S. See item 2 "On Line Form" in the article at http://gregmaxey.mvps.org/...

SQL Code
Hi, I have a form called DEPARTURES which has a STATUS field and a check Box field called CHECK OUT. What I want to do by using SQL in code is to set on a Table called RESPEL the STATUS field to OUT when I check the check box, which checks the corresponding RESNO field in the DEPARTURES form to be the same as the RESNO field in the RESPEL form. I tried to use the following but probably got it wrong: Private Sub CHECK OUT_AfterUpdate() strSQL = "Update RESPEL SET([STATUS] = OUT) WHERE DEPARTURES.RESNO = RESPEL.RESNO" End Sub Any Help? Thanks Ange Well, assumin...

tasks keep repeating
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Email Client: pop Certain tasks in my todo list repeat multiple times. For example I may have a task called &quot;go shopping&quot; with a due date etc... The next day there will be 2 tasks called &quot;Go Shopping&quot;. Exactly the same information. If I mark one as completed or delete it eventually a second one will appear. if I do nothing, eventually a third one will appear. There doesn't seem to be a set pattern. It could repeat daily or every other day. it just doesn't make any sense. <br&...

MS-Query code from EXCEL97 doesn't work in EXCEL2003 ??
I am using MS-Query to import data from SQLServer2000 to MS-EXCEL. We recently upgraded to EXCEL2003 from EXCEL97 and now MS-Query don't understand more "complicated" code which worked without problems in EXCEL97. The code below is an example of this problem. I understand that I can solve this through building views in SQLServer but I would prefer not to because of the number of views required. What has happended to MS-Query in EXCEL2003 and is there an solution to this available from Microsoft? -----------------------------------------------------------------------------...

Streamlining Code
Hi All, I would like to streamline my code & I'm having problems. Here's th code: Select Case Color1 Case "Blue": Selection.Interior.ColorIndex = 5 Selection.Font.ColorIndex = 2 Case "Red": Selection.Interior.ColorIndex = 3 Selection.Font.ColorIndex = 2 End Select As it stands, the code works & there are more colors with a secon Select Case using the same code (Select Case Color2) First of all, I was trying to use the Set command to make a variabl for the Selection.Interior.ColorIndex portion, but it's not working Second, I would like to defi...

30 Digits for Item Code
Can we make the RMS Item Code 30 digits to match GP? I know others have asked for this and I have a prospect who is wondering why I tell him Dynamics is a family of products when he has different field lengths. Rob ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http...

Text repeating on multiple worksheets
I have an file with approximately 10 worksheets. I am finding that cells A:29-A:31 from one of my worksheets is repeating on all of the worksheets and overwrite existing data (when they shouldn't). The same thing happens with cell C:28. I don't believe I've set anything to do it automatically and when I print it, it's ok. But when I save it and come back the next day, the data appears. It started on day 1 with C:28 and now it has moved into repeating the A cells as well. Help! What am I doing wrong? Thanks! Angie Check the content of cells A29:A31 and C28 on the ...

how can I know that the option of "Obtain DNS server address automatically" in Internet Protocol(TCP\IP) property have be set or checked by coding ?
> > how can I know that the option of "Obtain DNS server address > > automatically" in Internet Protocol(TCP\IP) property have be set or > > checked by coding ? I need to judge it and change "Obtain DNS server > > address > > automatically" to "Use the following DNS server addresses"; > > Are there any api or other methods to get it? AliR (VC++ MVP) wrote: > You can call GetAdaptersInfo(...). The DhcpEnabled member of > IP_ADAPTER_INFO tells you if DHCP is enabled or not. > AliR. AliR Thank your reply.but if D...

NM_CLICK Notification code in CTreeCtrl
Dear all, i have a CTreeCtrl which has checkbox. How can i catch the left mouse click event when user clicked in the check box? please help me Le Tuan sorry, please ignore this mess Le Tuan ...