Macro on Excel!?

Hello I have a simple problem  I want to create a macro so that instea
of dragging the formulae down to create a copy....

=E11/F11    I want to put this formula in G11,  now the problem is 
want to make this formula apply to the other cells below such as:

=E12/F12  in G12    etc etc like this all the way down, instead o
dragging it can i make a macro if so can anyone explain please

Thanks for your time 
From John Woo

--
Neo
-----------------------------------------------------------------------
Neo1's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=3032
View this thread: http://www.excelforum.com/showthread.php?threadid=50697

0
1/31/2006 10:07:05 PM
excel 39879 articles. 2 followers. Follow

3 Replies
441 Views

Similar Articles

[PageSpeed] 0

You have to be able to tell the macro when to stop.

Option Explicit
sub Testme01()
  dim LastRow as long
  dim wks as worksheet
  set wks = worksheets("Sheet1")
  
  with wks
     lastrow = .cells(.rows.count,"A").end(xlup).row
     .range("G11:G" & lastrow).formula = "=e11/f11"
  end with

end sub

This fills that range all at once with the formula.

You could record a macro when you type the formula once and then fill it down,
too.  You'll get different code, but it should work.

Neo1 wrote:
> 
> Hello I have a simple problem  I want to create a macro so that instead
> of dragging the formulae down to create a copy....
> 
> =E11/F11    I want to put this formula in G11,  now the problem is i
> want to make this formula apply to the other cells below such as:
> 
> =E12/F12  in G12    etc etc like this all the way down, instead of
> dragging it can i make a macro if so can anyone explain please
> 
> Thanks for your time
> From John Wood
> 
> --
> Neo1
> ------------------------------------------------------------------------
> Neo1's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=30329
> View this thread: http://www.excelforum.com/showthread.php?threadid=506971

-- 

Dave Peterson
0
petersod (12005)
1/31/2006 10:27:02 PM
Neo,
If you select the column, you can Edit/Fill/Down
Beege

"Neo1" <Neo1.22irym_1138745403.7848@excelforum-nospam.com> wrote in message 
news:Neo1.22irym_1138745403.7848@excelforum-nospam.com...
>
> Hello I have a simple problem  I want to create a macro so that instead
> of dragging the formulae down to create a copy....
>
> =E11/F11    I want to put this formula in G11,  now the problem is i
> want to make this formula apply to the other cells below such as:
>
> =E12/F12  in G12    etc etc like this all the way down, instead of
> dragging it can i make a macro if so can anyone explain please
>
> Thanks for your time
> From John Wood
>
>
> -- 
> Neo1
> ------------------------------------------------------------------------
> Neo1's Profile: 
> http://www.excelforum.com/member.php?action=getinfo&userid=30329
> View this thread: http://www.excelforum.com/showthread.php?threadid=506971
> 


0
1/31/2006 10:28:00 PM
If you have the data in cell F12 and below, then only have to double-click on 
the little black square in the lower right hand corner of G11 after you enter 
the formula there, and  the formulas will fill down as far as there is data 
in column F.

Vaya con Dios,
Chuck, CABGx3



"Neo1" wrote:

> 
> Hello I have a simple problem  I want to create a macro so that instead
> of dragging the formulae down to create a copy....
> 
> =E11/F11    I want to put this formula in G11,  now the problem is i
> want to make this formula apply to the other cells below such as:
> 
> =E12/F12  in G12    etc etc like this all the way down, instead of
> dragging it can i make a macro if so can anyone explain please
> 
> Thanks for your time 
> From John Wood
> 
> 
> -- 
> Neo1
> ------------------------------------------------------------------------
> Neo1's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=30329
> View this thread: http://www.excelforum.com/showthread.php?threadid=506971
> 
> 
0
CLR (807)
2/1/2006 12:39:02 PM
Reply:

Similar Artilces:

Custum Button for macro
Hi Some time ago I recorded two macros integral to the work I do share with three others. I assigned two custums buttons to them , but when I came into work on day the buttons were gone and I cant reassign the macros recorded i Personal workbook again.can anyone help. Kind Regards Decla -- Message posted from http://www.ExcelForum.com Why can't you reassign the buttons to the macros in your personal.xls file? Has the personal.xls file been deleted? Are the modules/procedures marked as private? Any chance that the toolbar got hidden? Tools|customize|toolbars If you see your toolba...

Macro for summarizing multiple sheets
Hello all I have a workbook with multiple sheets. Each sheet is identically laid out (the only difference is the sheet name - cart1, cart2, etc). Each sheet represent the contents of a cart and the expiration date of applicable items. I would like to create a macro or function that will search each sheet in sequence and return on a summary sheet the following information: the name of the sheet and any of the items with expiration dates that are within 45 day of the current date. Any help or suggestions would be much appreciated - see below for an example of the workbook ...

WinExplorer info to Excel
If I open My Computer (Windows 2000 Professional) in Details View, I can view the contents of any given folder or drive, with columns for filename, size, date created, date Modified, Author, etc. My question is, is there any way to get this information into an Excel worksheet? I have used another database explorer program (Invitrogen Vector NTI 10) which has a button called "camera" which does this. Thank you for your time and attention -- Anne Murray You can do it if you want to use "DOS" commands: Go to "START" - "ACCESSORIES" - "COMMAND...

Macro or Formula needed to search data in cells
Hi I am looking for a way to create a formula/macro to do the following: My worksheet setup: A1:A30000 C1:C5000 01 02 03 04 05 06 07 08 09 10 01 04 05 06 08 09 12 22 23 27 02 03 04 05 06 07 08 09 10 11 01 03 05 06 07 08 09 14 22 32 03 04 05 06 07 08 09 10 11 12 04 05 06 07 08 09 10 11 12 13 etc Each cell contains a 10 number sequence. The range A1:A30000 is my randomly generated sequence. And C1:5000 is my database of archived sequences. If I wish to check if the combination in cell A1 is anywhere in the range C1:5000. I use the formula. =IF(COU...

Import excel into RMS
I need to import excel file into RMS is the only way thru EMS, or is there another option? You can download the "Quicksell Import Tool" from the downloads section of http://www.jeanholland.com - you have to create an account, but it's free. The quicksell import tool is an UNSUPPORTED tool that MS released several years ago. You can use it to import Items, suppliers and customers. I tried it once and found that it was easier for me to just load the files directly into SQL Server and move the data around from there - but I'm a SQL geek... A lot of people seem to like...

Images in Excel 2000
I'd like to import an 8 1/2" x 11" jpg image into an exel 2000 spreadsheet and be able to enter data into the cells and still see the image underneath. Is this possible and how do I do it. This would be impossible or nearly so using Microsoft Excel. You could do it with Word. http://www.officearticles.com/word/typing_on_top_of_a_scanned_form_in_microsoft_word.htm However, I think it's crazy to try it under any circumstances. ******************* ~Anne Troy www.OfficeArticles.com www.MyExpertsOnline.com "cjones" <cjones@discussions.microsoft.com> wrote in ...

How to insert an existing macro into "Additional Include Directories"?
I have post this to another group. To avoid cross posting, I give the link to the original post. http://groups.google.com/group/microsoft.public.vsnet.general/browse_thread/thread/bc7ece9c00632947?hl=zh-CN Please give some consideration. Thanks in advance. ...

comp.apps.spreadsheets,microsoft.public.excel,microsoft.public.excel.programming
Hi All, I am generating large amounts of data that need to be analyzed on the fly. To simplify the problem, consider an Excel workbook that has n number of data sheets, S1 to Sn. Each spreadsheet has 5 columns, C1 to C5 and x number of rows, R1 to Rx, in addition to the a header row. The workbook also has one main sheet called Smain. The workbook should be capable of doing the following automatically, either by pressing a button or auto-refresh when the data is updated: 1. The rows of each data sheet should be sorted max to min according to C3. 2. If the maximum value in C3 of a given sheet...

VB Scripting/Macro
Question: What VB code will allow me to rewrite just the worksheet reference in a function/cell reference. For example it says =January!$AH40 and I would like a macro that would change it to =February!$AH40 Any suggestions would be greatly appreciated!!! :) Background: I have 12 cells in a row that each refer to the same cell location on twelve different worksheets within the same workbook. The fill function does not "fill" the worksheet reference. It is too time consuming to manually input or edit 2016 cells. Hi you may have a look at the INDIRECT function for this ...

Import Budget into GP v.10 from Excel
This is a multi-part message in MIME format. ------=_NextPart_000_004F_01C99834.C340E060 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I am having an issue and have followed the following but it still does = not work.=20 Error message when you try to import a budget in General Ledger in = Microsoft Dynamics GP: "The number of periods for the budget does not = match the number of columns in Excel" View products that this article applies to. -------------------------------------------------------------------------= -----...

excel Hyperlink question
Is there a way I can have a spreadsheet that in one column on a particular cell there will be a hyperlink to a word document? Under the Insert Hyperlink menu, I think if you select the "Existing File or Web Page" button and point to what you want, that should do it. HTH Steve "Pam Coleman" <PamColeman@discussions.microsoft.com> wrote in message news:219B8DA6-B7E1-4405-A272-2EEEAF6F8786@microsoft.com... > Is there a way I can have a spreadsheet that in one column on a particular > cell there will be a hyperlink to a word document? Is there a way the hype...

Excel properties
Hi, I'm having a problem running a Word macro which mailmerges data from an excel file I get sent regularly. This only started happening recently. I noticed that my macro runs fine if I open the Excel document then 'save as' the same name. Looking at the properties within Excel I see the original has nothing under the general tab and the archive box is unticked. The resaved document has all the 'type', 'location', 'size' etc data as you would expect, plus the archive box is ticked. Anyone know what's going on here then? Cheers, Shedlord ...

macro in excel 2007
I was able to access the macro trust level. My excel has customized form fields that don't show unless I populate the second options, what is the third option, will it let the fields stay available so I don't have to populate everytime? I have a trusted source. Hi Tillie, Without seeing the actual macro code (assuming that you issue is controlled by code and not by worksheet protection) then I don't think it is possible to answer your question. You probably should talk to whoever set up the worksheet. "access the macro trust level" only allows you to decide wheth...

Trying to automatically import specific data from Excel into Word:
Thanks in advance for anyone who can help me with this: I'll start by explaining the spreadsheet I created in Excel (an inventory / information worksheet): It is pretty simple; approximately 12 columns. The key column is the item number / UPC / bar code number, then after that there are various information columns including item name, description, condition, picture links, etc. Secondly, I created a template Microsoft Word document that is relatively long, but will have a few lines (give or take...about 7) customized for each item on the inventory. What I am trying to d...

Filtering Excel 2003 Charts to a date range
I have multiple charts that we look for trends on over 1-2 year time frames. Is it possible to have a chart show all the data that has been entered and when looking at the chart have a date range data to format that range differently. What I am trying to do is we have weekly or montly meetings, in these meetings I would like to show all the additional data differently that has been added since our last meeting, while showing accumulative data in a different format. The easiest way to get different formats is to use different series. If you had one series, you could use autofiltering to...

'Contains Macros' When it doesn't...
Hi, I have a very simple spreadsheet. The only 'advanced' feature it has is a small lookup table that is an external data reference to an Access Database Table. This external reference is set to auto-update on sheet open. Problem is, as part of a failed experiment, I created a macro, then a while later deleted it again, however, even though the sheet now contains no macros(according to Tools->Macro), everytime I open it I get the message 'This contains macros, Enable Macros/Disable Macros/More Info Is this because of the auto-update on the external reference, or do I hav...

Select buttons pasted into Excel
I pasted a table from my investment account into Excel. The tabl included option buttons. I can get rid of the alpha/numeric part of th paste but the buttons remain. I've tried to format & copy empty cells but the button remains. I ca turn on the button -- nothing happens that I am aware of. How do I get rid of it?? Delete or clear doesn't work. joe -- jzemane ----------------------------------------------------------------------- jzemanek's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1463 View this thread: http://www.excelforum.com/showthrea...

How to get an excel doc not saved as "Read Only"
I'm trying to figure out why my Excel doc saves as "Read Only". Is there something I can do to prevent this in the future? Try File>Properties>General tab and see if Read Only is checked. -- Sincerely, Michael Colvin "bunbarn" wrote: > I'm trying to figure out why my Excel doc saves as "Read Only". Is there > something I can do to prevent this in the future? Some additional items to work through: Read-Only in Excel, Problems with http://www.mvps.org/dmcritchie/excel/readonly.htm --- HTH, David McRitchie, Microsoft MVP - Excel ...

Convert Xls to PDF For Excel
Convert Xls to PDF For Excel is the fast, affordable way to creat professional-quality documents in the popular PDF file format. It easy-to-use interface allows you to create PDF files by simply clic the "Save as PDF" button from MS Excel, creating documents which can b viewed on any computer with a PDF viewer. Convert Xls to PDF For Exce supports Font embedding, resolution, compression and multi-language And Convert Xls to PDF For Excel don't need any software such as adob acrobat. Easy Converting Microsoft Excel documents into PDF normal files couldn't b any easier. Simpl...

Issue in reading data from Excel
Hi All, I have 3 excel files with me. say,Test.xlsx, saved.xls and original.xls. Here Test.xlsx has got reference to saved.xls and original.xls and displays values from both files. But the cells referring to data from Original.xls shows #N/A in Test.xlsx where as data from Saved.xls shows the correct values. (I am using the formula: =HLOOKUP(A5,'D: \Testing\[Original.xls]Output'!$A$1:$CQ$2,2,FALSE) Here, saved.xls and original.xls has got same columns and same data, but if i check the files size of both, they are different. size of Saved.xls is 26 KB and the size of Original.xls file...

Import MS Word 2003 Table to Excel
I have a word document that has many tables. I need to take each table and put them into one cell in excel if possible. I have several test documents that I was able to transfer the information from Word to Excel in a row per record. I need to keep the tables with their respective row(record). Any help is greatly appreciated. ...

amortization tables
Looking for some macros or add-ins to assist with Amortization tables. Any help would be appreciated -- Message posted from http://www.ExcelForum.com > Looking for some macros or add-ins to assist with Amortization tables. One way to proceed is to start with an existing template. For example, you could open http://office.microsoft.com/templates/default.aspx and search the "Templates" section for "amort". shadestreet Here's one that may be useful to you http://www.dicks-blog.com/excel/2004/06/amortization_ta.html -- Dick Kusleika MVP - Excel Excel Blog ...

how can i lock a sheet in an excel file????
I made an excel of 5 sheets and i want to send it to all my employees, but I dont want them to have axces in just one sheet....Can I lock this sheet with a password??? you have a few options: 1. you can hide the sheet. 2. you can password protect the sheet with a password, on the review tab in excel 2007, tools/protection in 2003 3. you can limit the access to just cell a1, for example. alt-F11 to get to the vb editor,click view then properties window (or press F4), select the sheet and in the scroll area, enter A1. then they won't be able to select anything but A1. then...

Transfer data from Excel col. A to columns B-E in the same sheet
I have an Excel 2003 spreadsheet with only one column of player data: column A. The first three data items in column A are the same for every player: Name, Address and Phone. Every player also has at least one comment but could have any number of comments. Each player’s data is separated from the next by a blank cell in column A. Sometimes, a player’s last few comments are blank resulting in multiple blank cells in column A before the data for the next player starts. I need help writing an Excel 2003 VBA macro to: 1. Copy just the player’s name, but not the Name: label, to c...

Excel macro !!
Hi all. I want to write a macro in an excel sheet wherein I want to copy a few cells from my source worksheet and paste their link ...not teh HYPERLINK.....to another worksheet. Also, the destination worksheet's cell number where this is pasted is not fixed. How do I accomplish this? Please help urgently. Thanks. Edit=>PasteSpecial Click the Paste Link button. -- Regards, Tom Ogilvy "SPG" <not@noreply.com> wrote in message news:uJOnCdrLEHA.3292@TK2MSFTNGP11.phx.gbl... > Hi all. > I want to write a macro in an excel sheet wherein I want to copy a few > ...