Macro to copy cell down

I want to create a macro that will copy the cell above to the active
cell.
OR the built-in key that will do that

tenbob@optonline.net


0
tenbob (5)
11/4/2003 4:26:28 AM
excel 39879 articles. 2 followers. Follow

5 Replies
450 Views

Similar Articles

[PageSpeed] 38

Bob

A few seconds with the macro recorder set to "Relative Reference" gave me
this.

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 11/3/2003 by Gord Dibben
'

'
    Selection.Copy
    ActiveCell.Offset(1, 0).Range("A1").Select
    ActiveSheet.Paste
    Application.CutCopyMode = False
End Sub

Gord Dibben   XL2002

On Tue, 04 Nov 2003 04:26:28 GMT, Bob K. <tenbob@optonline.net> wrote:

>I want to create a macro that will copy the cell above to the active
>cell.
>OR the built-in key that will do that
>
>tenbob@optonline.net
>

0
Gord
11/4/2003 4:40:17 AM
Where, in macro recording, do I set this to Relative Reference


On Mon, 03 Nov 2003 20:40:17 -0800, Gord Dibben wrote:

>Bob
>
>A few seconds with the macro recorder set to "Relative Reference" gave me
>this.
>
>Sub Macro1()
>'
>' Macro1 Macro
>' Macro recorded 11/3/2003 by Gord Dibben
>'
>
>'
>    Selection.Copy
>    ActiveCell.Offset(1, 0).Range("A1").Select
>    ActiveSheet.Paste
>    Application.CutCopyMode = False
>End Sub
>
>Gord Dibben   XL2002
>
>On Tue, 04 Nov 2003 04:26:28 GMT, Bob K. <tenbob@optonline.net> wrote:
>
>>I want to create a macro that will copy the cell above to the active
>>cell.
>>OR the built-in key that will do that
>>
>>tenbob@optonline.net
>>

0
tenbob (5)
11/4/2003 5:08:40 AM
Thanks for the fast reply, Gord
Where do I set the recorder for    Relative Reference  --

On Mon, 03 Nov 2003 20:40:17 -0800, Gord Dibben wrote:

>Bob
>
>A few seconds with the macro recorder set to "Relative Reference" gave me
>this.
>
>Sub Macro1()
>'
>' Macro1 Macro
>' Macro recorded 11/3/2003 by Gord Dibben
>'
>
>'
>    Selection.Copy
>    ActiveCell.Offset(1, 0).Range("A1").Select
>    ActiveSheet.Paste
>    Application.CutCopyMode = False
>End Sub
>
>Gord Dibben   XL2002
>
>On Tue, 04 Nov 2003 04:26:28 GMT, Bob K. <tenbob@optonline.net> wrote:
>
>>I want to create a macro that will copy the cell above to the active
>>cell.
>>OR the built-in key that will do that
>>
>>tenbob@optonline.net
>>

0
tenbob (5)
11/4/2003 5:13:34 AM
Bob

Should be a "relative reference" button on the Stop Recording Toolbar that
pops up when you go to Tools>Macro>Record New Macro.

Also should be on the Tools>Macro fly-out menu.

Sounds like you're just getting started at this macro thing.  Good way to get
your feet wet is to record some moves.

David McRitchie has a "getting started" page on his website.

http://www.mvps.org/dmcritchie/excel/getstarted.htm

Note the links down near the bottom under "Related".  The link to VBA 101 is a
good one.

Gord

On Tue, 04 Nov 2003 05:13:34 GMT, Bob K. <tenbob@optonline.net> wrote:

>Thanks for the fast reply, Gord
>Where do I set the recorder for    Relative Reference  --
>
>On Mon, 03 Nov 2003 20:40:17 -0800, Gord Dibben wrote:
>
>>Bob
>>
>>A few seconds with the macro recorder set to "Relative Reference" gave me
>>this.
>>
>>Sub Macro1()
>>'
>>' Macro1 Macro
>>' Macro recorded 11/3/2003 by Gord Dibben
>>'
>>
>>'
>>    Selection.Copy
>>    ActiveCell.Offset(1, 0).Range("A1").Select
>>    ActiveSheet.Paste
>>    Application.CutCopyMode = False
>>End Sub
>>
>>Gord Dibben   XL2002
>>
>>On Tue, 04 Nov 2003 04:26:28 GMT, Bob K. <tenbob@optonline.net> wrote:
>>
>>>I want to create a macro that will copy the cell above to the active
>>>cell.
>>>OR the built-in key that will do that
>>>
>>>tenbob@optonline.net
>>>

Gord Dibben   XL2002
0
Gord
11/4/2003 5:34:03 AM
> >>OR the built-in key that will do that

To copy the cell above the active cell to the active cell, I believe that
would be Ctrl + "D"

A recorded macro would be...

Sub Demo()
    ActiveCell.FillDown
End Sub


HTH
-- 
Dana DeLouis
Using Windows XP  &  Office XP
= = = = = = = = = = = = = = = = =


"Bob K." <tenbob@optonline.net> wrote in message
news:7bdeqv8t1t0jubdr522s2hgvpsf5mmvr96@4ax.com...
> Thanks for the fast reply, Gord
> Where do I set the recorder for    Relative Reference  --
>
> On Mon, 03 Nov 2003 20:40:17 -0800, Gord Dibben wrote:
>
> >Bob
> >
> >A few seconds with the macro recorder set to "Relative Reference" gave me
> >this.
> >
> >Sub Macro1()
> >'
> >' Macro1 Macro
> >' Macro recorded 11/3/2003 by Gord Dibben
> >'
> >
> >'
> >    Selection.Copy
> >    ActiveCell.Offset(1, 0).Range("A1").Select
> >    ActiveSheet.Paste
> >    Application.CutCopyMode = False
> >End Sub
> >
> >Gord Dibben   XL2002
> >
> >On Tue, 04 Nov 2003 04:26:28 GMT, Bob K. <tenbob@optonline.net> wrote:
> >
> >>I want to create a macro that will copy the cell above to the active
> >>cell.
> >>OR the built-in key that will do that
> >>
> >>tenbob@optonline.net
> >>
>


0
ng_only (45)
11/5/2003 11:30:06 AM
Reply:

Similar Artilces:

Macro
Is it possible to add a macro as a custom POS button? Thank you, Sylvain ...

Automatically inserting text into a cell
I have a formula in a cell that reads like this; =IF(A12="","",WORKDAY,(A12,5) In column M I am asking if a report is due Y/N. Can I add to the above formula to automatically insert "N/A" into N12 if there is a "N" in column M? One way: N12: =IF(M12="N","N/A",IF(A12="","",WORKDAY(A12, 5))) In article <39A51AAF-D44A-4356-B20A-71C8AA661338@microsoft.com>, Roy <Roy@discussions.microsoft.com> wrote: > I have a formula in a cell that reads like this; > =IF(A12="","",W...

How can you set up a form that the cursor only moves to cells tha.
I have set up a form. Now I want my cusor to move through the worksheet only in certain cells. I want to be able to go from one cell that needs to be filled out to the next cell that needs to be filled out automatically. Example , move from cell a3 to c19 automatically. How can I do that? Hi! You can accomplish that by setting sheet protection. Select all the cells that you want to be able to navigate to then goto Format>Cells>Protection tab. Uncheck Locked. Now, goto Tools>Protection>Protect sheet. A list of options will appear. Uncheck Select locked cells and check...

How can I autofill dates having a blank cell between each day?
Hi Dee, Enter a date in cell A1 (eg 5/13/08), enter the next day's date in cell A3 (eg 5/14/08). Select cells A1 trough to A4 (ie select two dates and two blank cells). See the little dot at the bottom right of the selection rectangle? Click on that (the cursor will change to a cross when you are over the right spot) and drag it down as far as you want. Ed Ferrero www.edferrero.com ...

Personal Macro Workboos
Is it possible for a personal macro Workbook to be shared between two people or do I need to make sure there is a copy of the personal macro workboox on each machine. Are you wanting to share macros between people? If so you could create an addin with the macros. That add-in could be stored on a network server and accessed from there to ensure that you both (all?) have the same version. -- HTH RP (remove nothere from the email address if mailing direct) "DK" <DK@discussions.microsoft.com> wrote in message news:CC9A4A67-F391-44ED-9E53-C11DE3131008@microsoft.com... > ...

how to put a loop in a macro?
I have a macro as follows: Sub Macro2() ActiveCell.Offset(-1, 0).Range("A1").Select Selection.Hyperlinks.Delete Selection.Cut ActiveCell.Offset(-1, 1).Range("A1").Select ActiveSheet.Paste ActiveCell.Offset(1, 0).Rows("1:2").EntireRow.Select Selection.Delete Shift:=xlUp ActiveCell.Offset(2, 0).Range("A1").Select End Sub It selects the above cell. Remove the hyperlink, moves it to top-right cell, selects two rows and delete them and sits in the two rows below same cell as started and ready to do this task again. I have many...

Determine a cell's width and enter it in the cell
I have several workbooks with multiple sheets that I'd like to have the same various column widths on each sheet. I get it all set up and then one column will need to be wider. Now I have to go to a cell in each column, check column width, and enter it in each cell. I then have a sub that reads the value in a cell and sets the width to that value so that I can copy the row to each other sheet to resize them. Is there a way to automatically read a cell's width and enter that value in the cell? Thanks for any suggestions. As an alternative: you could "group" all the...

Convert Word Table -> Excel without merged cells?
Whenver I copy/paste tables from word to excel, I get merged cells in Excel whenever there are line breaks in the word table cells. How can I avoid this? TIA Steve Saved from a previous post: If your cells in your word table contain paragraph mark or linebreak characters, then excel will bring them over as separate cells. One way around it is to convert those paragraph marks & linebreaks to unique characters, then copy|paste and then convert them back to linefeeds. I like this technique (inside a copy of the word file): Select your table. Edit|replace|Special (show More if required)...

Deleting Parts of Cells
I have a list of information in a column. All the information has the format of having numbers and letters then a / and more data. I only want to look at the data to the left of the /. So, I would like the data to the right of the / deleted, including the /. For example, I need YYY9/5 to read YYY9. Any suggestions? You could bring it into Excel as a txt file open the txt file in excel Text Import Wizard will appear select >delimited check > other and type the "/" into the box finish you should have a separation where the / was. "GOL" wrote: >...

Transform a Cell from Formula to Number
Is there a way to turn a cell from a formula to the number the formula outputs? Copy it to the clipboard, then do Edit>PasteSpceial, click Values -- HTH Bob Phillips "Sloth" <Sloth@discussions.microsoft.com> wrote in message news:76DA206E-CFC3-4E63-9789-69735538E1A7@microsoft.com... > Is there a way to turn a cell from a formula to the number the formula outputs? Copy the cell. Edit/Paste Special/Values. In article <76DA206E-CFC3-4E63-9789-69735538E1A7@microsoft.com>, "Sloth" <Sloth@discussions.microsoft.com> wrote: > Is there a way to...

Stagnant cell for counting filtered data
I want to keep one cell that houses the count of the data depending on how it is filtered and that cell remain visible despite how it is filtered. I can't get the formula =COUNT(C9,C1:C100) to work or get it to stay visible if I change the filter. Place the formula in row 1 that contains your titles...........assuming you have these. =SUBTOTAL(2,C2:C100) the 2, means count If you don't have titles in row 1, place the formula after a blank row below your data. Note: you use COUNT in your original. COUNT only counts numerics. Maybe you want COUNTA which would be =SUBTOT...

Can formulas in cells be made to remain if the data is deleted?
Can you explain in a bit more detail what your question/problem is? -- Kind regards, Niek Otten "wendyp" <wendyp@discussions.microsoft.com> wrote in message news:B7A92B0A-E752-4D58-90FF-3DE5F292D35C@microsoft.com... > Hi Wendy, See Insert a Row using a Macro to maintain formulas http://www.mvps.org/dmcritchie/excel/insrtrow.htm To simply remove constants from a selection within a macro Selection. SpecialCells(xlConstants).ClearContents To remove constants manually from a selection Edit, GoTo (Ctrl+G), Constans [you can pick what kind ...

How to copy a missing font to publisher
I am missing the Antique Olive font in Publisher only. How do I get it back? That font was included with some HP products years ago, that is how I acquired my copy. Do you have the Antique Olive font in the font folder? If it is in the font folder it should be in Publisher's font list. Do you have a font manager? Might be it has lost its path. Aliases here http://desktoppub.about.com/cs/findafont/a/fontaliases_o.htm -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Sharon" <Sharon@discussions.microsoft.com> wro...

Outlook Select/Copy/Paste issue
Very strange. In Outlook 2007 I cannot select text to copy & paste anymore. Normally I can Click and drag to highlight text, then copy. Now when I place the mouse over the text, the cursor turns into a hand and I cannot highlight/select. If I click the mouse button the hand turns into a fist. If I right-click I get a drop down menu with the following items.... "Synonyms", and "Translate". If I start Outlook in "Safe Mode" I do NOT have this problem. I tried disabling all the Add-Ons but no luck. Any suggestions? Thanks. "Mark" <markl@...

Why show Enable/Disable macro prompt after I deleted all macros?
Hi, I used to have some macros in my excel which I deleted. Now I still get the Enable/disable macro prompt and the Personal workbook (where the macros were) keep opening- it's irritating, how do i stop both?. I want to keep my security settings as it is. Thanks You probably still have a module or modules in the VB Editor. Go to the VB editor and right click on any modules and select delete, when asked if you want to export data, select no. HTH Regards, Howard "m123" <m123@discussions.microsoft.com> wrote in message news:14116171-55E6-4A25-BF8F-FF...

Macro recorder #2
How can I use relative references in my macro when I record a macro with the "record"-tool? >-----Original Message----- >How can I use relative references in my macro when I >record a macro with the "record"-tool? >. > Use the arrowkeys in a formula this will give you something like this ActiveCell.FormulaR1C1 = "=RC[-3]*RC[-1]" Regards Peter Click the "Relative Reference" toolbutton (the second toolbutton) on the Stop Recording toolbar, which should appear when you start recording. If it doesn't appear that would be beca...

auto copy and paste to another workbook by using specific titles
I am trying to get information from a row that contains a specific title to be transferred to another workbook automatically. I also need to know how to do this with the cells not matching up. Hello: Your question is vague. If you mean that when someone opens the spreadsheet, the contents of a row with a certain title is copied to another spreadsheet, then you can use the Auto_Open() event to search for the row, open the target spreadsheet, insert it, and then close the spreadsheet, saving the contents. Again, I may not be addressing your question, but again, it very gener...

adding more code to an existing macro
Many thanks to those who helped me last week with my question of assigning macro to checkboxes. I now have a new related question. I am trying to add some new commands to the undo portion of my checkbox macro and just tried to copy in the new code next to what I already had, but I keep getting error messages. This is the code for the new actions: Range("G15").Select Selection.ClearContents Range("I15").Select Selection.ClearContents Range("C15").Select ActiveCell.FormulaR1C1 = "=RC[4]*RC[6]" Range("D15").Select When ...

Copying Information
> This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --B_3350283589_2423585 Content-type: text/plain; charset="ISO-8859-1" Content-transfer-encoding: 8bit Hello everyone, I'm having trouble copying data from a table ( st ) in one db ( tecnicil_industria1 ) to the same table in a different db ( tecnicil_ind2010r ). Below is my query and the result error I'm getting. Can any help on how to go about doing this: Use tecnicil_ind2010r Go insert into st select * from te...

Excel File Rename Macro Help!
Hello All! Daily csv files are dumped into a shared folder and i have written a macro that goes into that folder and automatically pull in data to put it in microsoft access tables. What i want to do next is after importing the data into access, rename those files to include dates and times. This import runs every morning so whenever a new csv is dumped in there, my macro will run the newest ones and avoid the past ones. Any ideas guys? I guess im looking for a rename macro sql script. Please see below script. Any help would be greatly appreciated!! Dim fso As Object, fol As Object, fils...

A little macro help?
I would like to use a macro to copy and repeat lines 'X' times on a new page. To find out how many times each row is to be copied, the number is provided in the last column ('C' in this case) of a spreadsheet. Sample data for start point: Lastname First Name Qty Smith John 3 Hank Aaron 5 Result required on new sheet in same spreadsheet: Lastname First Name Smith John Smith John Smith John Hank Aaron Hank Aaron Hank Aaron Hank Aaron Hank Aaron Can someone provide some macro code that will create the number of required rows on a new sheet called 'list' within th...

Format Cell (Number Custom)
I want the user to only be allowed to enter the Char type 'A' or 'D' in this particular cell. Does any know how to accomplish this? Does Char type 'A' or 'D' mean the characters A or D? If yes, take a look at Data|Validation. It isn't foolproof (users can paste over the cell), but it works nicely for most. barryderay wrote: > > I want the user to only be allowed to enter the Char type 'A' or 'D' in this > particular cell. > Does any know how to accomplish this? -- Dave Peterson ...

You made changes to another copy of this object...
Hi all, Somewhere out of nothing when I open a task the following message appears in a grey bar on top of the task: "You made changes to another copy of this object. This is the most recent version. Click here to see the other versions" Why does this happen? It is a reoccurring task, and the task from the past which was markt completed suddenly is overdue.. Is there an explanation for this?? Regards, M. ...

Finding first empty cell in a column
I need a macro to find the first empty cell in a column and return the column and row number. Any help will be appreciated. ...

linked cell contents not autofitting row height
Why doesn't Excel 2002 autofit row height for text input from a linked cell? When the linked cell contents exceed the currently viewable contents of the recipient cell the row height is not adjusted. Is there a way to make the autofit work in these circumstances? Formulas don't change format and rowheight is a format. You could use a worksheet event that resets the rowheights whenever that worksheet recalculates. If you want to try this, rightclick on the worksheet tab, select view code and paste this into the code window. Option Explicit Private Sub Worksheet_Calculate() ...