Position Independent Autofill Macro

Feb 4, 2010

I need a macro that can autofill irrespective of where the source cells are. Like, this is what I want to do:

Select two cells containing a descending order such as 50, 40. Hit the hotkey and the macro should autofill the same way as double clicking the bottom right corner of the selection.

The problem is that the two source cells can be anywhere in the sheet, and autofill range isn't fixed. Essentially, I just want a keyboard shortcut for Excel's own Autofill function.

I want this macro to be rid of the mouse when I'm working on excel (it really slows me down to use the mouse every time I want to autofill).

View 9 Replies


ADVERTISEMENT

Macro Computing Planetary Position

Sep 14, 2006

Im looking for an Excel macro that will allow me to input any date and time and produce x,y,z co-ordinate results for planetary positions relative to the centre of the universe. I already have a database with ephemeris data but find it difficult to use manually inputting date and time constantly. I need to perform so many calculations that automating this procedure is essential to me but i dont know how.

View 2 Replies View Related

Macro Not Looping To Correct Position

Sep 19, 2006

I'm having trouble with a macro not looping back to the right place. The macro runs fine but is looping back to the very beginning instead of to the DO WHILE point which is the bit I would like to loop through. The code I have posted is a little long I am afraid (with the first part being largely irrelevant to the issue I am trying to solve), but I have marked where I am trying to get the macro to loop though.

Sub Collect_Trade_Data()

Dim y As String

Dim strResult As String
strResult = Dir("K:BTSFilesMQ_FromBloombergutilities.txt")
Select Case strResult
Case ""

Case Else

Application. ScreenUpdating = False

Workbooks.OpenText Filename:="K:BTSFilesMQ_FromBloombergutilities.txt", _
Origin:=xlMSDOS, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, _ ...............................

View 9 Replies View Related

Autofill In Macro ..

Dec 29, 2008

I am working on automating our truck payment system. When the macro copies the data over to the output printout sheet, it will only copy the information once, even though there are 15 lines that it should be copied to. When I originally recorded the macro, I used the auto fill option to fill the information for all 15 lines. However, when I run the macro the auto fill doesn't work for me.

View 8 Replies View Related

Autofill A Macro

Jan 29, 2010

I currently have a worksheet that, using a Form Button, generates a new worksheet that formats column widths, titles and also creates a file list of all files on my hard-drive along with date created and the full file path.

Each file has all of its information in one row.

From the original button that initiates the whole process I need the code to create a delete button for each file in the list using, I presume, the kill function.

The delete button would need to sit in column 'L' starting in cell '5' and autofill down. The kill function would pull the file path of the file to kill from the full file path displayed in column 'K', again starting in cell '5'.

I already have the code to genereate the file information (path, date created etc). I literally just need the code for the creating the multiple form buttons and assigning the macro to each button.

View 9 Replies View Related

AutoFill In Macro

Jan 2, 2007

code?

View 9 Replies View Related

AutoFill Macro

Jan 10, 2007

The following code works fine for what I want to do. I want to have a range a5:g5 copied and pasted on down to g200 - as you would do if you selected and draged the selection box on down to paste it. The problem is I want to avoid the ".select".

What solution whould I use?

Worksheets("GTopLists").Range("A5:G5").Select
Selection.AutoFill Destination:=Range("A5:G200"), Type:=xlFillDefault

View 6 Replies View Related

Position Cell In Top Left Position

Jan 7, 2009

Is it possible to position a predetermined cell (e.g. A42) in the top left corner of the screen. (Not every screen users use has the same size)

View 3 Replies View Related

Macro To Hide Column With Relative Position

May 16, 2014

I am trying to hide a column titled "Test". This column is usually column E, but it is possible it can be moved to column D or F. If I use:

[Code] .........

Then column E is hidden, regardless of whether Test is moved left or right. The reason Test moves is due to the user inserting or deleting a column.

View 5 Replies View Related

Macro To Move Cursor To Home Position

Mar 15, 2014

Doing a search function where the cursor is on a row some where (unknown).

I would like to move the cursor to the first column of the spreadsheet.

View 2 Replies View Related

Autofill Columns Macro

Mar 29, 2014

Problem: The following code autofills columns O:P beyond the last row of data in column H.

Range("O3:P3").AutoFill Destination:=Range("O3:P3" & Range("H" & Rows.Count).End(xlUp).Row)

View 3 Replies View Related

Autofill Macro Monthly

Jul 14, 2008

I want to do is set up a macro to autofill into a new column every month. My data is linked to another excel document so that is where it is pulling the data from. Currently I have data in columns monthly from Dec 2001 until June 2008. I just want a macro that will automatically add in the next month, so in this case July then August the following month ect.

View 10 Replies View Related

Autofill Numbers Using Macro

Jan 21, 2010

I have recorded a macro and it is working fine

My query is while the macro is running a column is inserted and numbers are autofilled

View 14 Replies View Related

Macro To Autofill Columns

Oct 14, 2011

I need with the below statement. I need the statement to autofill columns b6:y6 down as long as there is data in column A6 down.

I am hitting a wall here

Sub Macro3()
'
' Macro3 Macro
' Macro recorded 10/14/2011 by Oasis Group
'
' Keyboard Shortcut: Ctrl+Shift+B
'
Range("B6:Y6").Select
Selection.Copy
Application.CutCopyMode = False
Selection.AutoFill Destination:=Range("B6:Y" & Lastrow)
Range("B6:Y" & Lastrow).Select
End Sub

View 3 Replies View Related

Reference Named Range By Position Macro Code

Mar 11, 2008

This seems really basic, but I can't seem to find it...

Using Visual Basic, if I have a named range, lets say like "NAMEDRANGE", how can I refer to cells in that range by their position in the range? For example, if I want to refer to the cell in the 2nd row and 3rd column of the range.

Also is their an easy way to refer to the first(top-left) cell in a named range?

View 3 Replies View Related

CALENDAR Macro Autofill With Two Extensions

Aug 23, 2013

The macro should...

1. Autofill dates from the Start Date ("D5") for x amount of years. Autofill begins in Range("C10")
2. Point out the THIRD 'wednesday' of every month with a "1" in column D.
3. Point out the second last 'weekday' of every month with a "1"in column E.

View 3 Replies View Related

Autofill Until Non-blank Cell Macro

Jan 10, 2009

I have searched the forum a few times and haven't seen an exact example of what I am trying to do, so I hope this isn't a duplicate.

I am looking for a macro to copy a cell and autofill it down the column until it gets to a non-blank cell. When it reaches that cell it needs to then copy THAT cell down until it reaches another non-blank cell... this could happen just a couple times, a couple dozen times, or only the very first time.

So for example:

In cell B2 there is text "Data1"
In cell B13 there is text "Data2"
In cell B25 there is text "Data3"

I would like the macro to search column B to find "Data1", and then copy it down the column until it reaches B13, then copy "Data2" down until B25, where it would then copy "Data3" down until the end of the document. The location of the data in column B varies, and the number of cells with data in column B will vary as well.

View 9 Replies View Related

Absolute Range - AutoFill Via Macro

Jul 1, 2009

In a macro - how can you copy a cell and keep a data range absolute?

In the statement below, the range denoted by: DATA!RC[-52]:R[829]C[-52] is D2:D829. When I use the macro to Autofill using the following:

(Selection.AutoFill Destination:=Range("BG2:BG220"), Type:=xlFillDefault)

the range progresses. I need to have the range as an absolute.

Sheets("Report").Select
Range("BG2").Select
Selection.FormulaArray = _
"=SUM((DATA!RC[-52]:R[829]C[-52]=""APPOINTMENT"")*(DATA!RC[-55]:R[829]C[-55]>=Report!RC[-1])*(DATA!RC[-55]:R[829]C[-55]

View 9 Replies View Related

Creating Independent Filters?

Aug 1, 2012

Is it possible to create independent filters. I have data for five departments and sales for different quarters of the years. These sales for the different quarters are independent. But If I select Q1 for first department and Q2 for second department it do not give me the result that I seek i.e. sales for first department for Q1 and Sales for second department for Q2.

View 9 Replies View Related

Independent Adjacent Groups

Jun 30, 2008

If the issue is not immediately clear:
If I select, for example, columns B:E and group (Data -> group and outline -> group). These can be hidden/unhidden easily with the line and + button created in the process. A similar set of columns (e.g. P:S) will behave in exactly the same way. If I have grouped columns B:E however and then try to group F:H, I end up with one large group spanning B:H.

If it is possible to create these 'separate' or 'independent' adjacent groups, I'd love to know how; if not, I'd be interested to know if anyone else has found this irritating

View 3 Replies View Related

Macro To Create Worksheet, Change It's Position, And Paste Date Into It

Apr 26, 2009

I need a macro that will create a new blank worksheet, move it to the last spot and paste the entire contents of the sheet named "master" into the newly created sheet.
I have tried to do this with the recorder but have been unable to get it to work.

View 9 Replies View Related

Excel 2007 :: How To Get Macro To Move Around A Page In Relative Position

Apr 9, 2014

My OS is Windows 7. My version of Excel is 2007. I have read how to get a macro to move around a page in a relative way, but is there a way to move from page to page in a relative way as well?

View 5 Replies View Related

Autofill Summary Macro As New Worksheets Are Added

Jun 11, 2014

Trying to write a macro so that my summary worksheet will auto populate when new sheets are added and filled out. I want the PO#, Quanity, Date ordered, Vendor, Subtotal, Tax and Total all to transfer from worksheets like F001 to the summary sheet. Yes there is only one F001 sheet filled out but that number will rise into the hundreds as the project progresses. No idea where to begin when writing this macro.

View 1 Replies View Related

Macro, Autofill On Varying Numbers Of Rows

Jan 13, 2003

I am putting together a macro to import a CSV file onto excel. I will be manipulating columns of data (concatinating some, dividing by 100 etc.)

What I am having trouble with is that each file imported will have different number of rows.
I tried, in recording a macro, to use autofill (entered formula and double-click fill handle to drop the fourmula into each cell) hoping this would show me how to do it but alas, it just coded the range as the starting and stopping cells (didn't show a count formula or some such.

View 9 Replies View Related

Autofill Macro For Variable Cell Data

May 13, 2006

I'll do what I can to explain this mess I want to clear up...I have a series of excel reports I have to download and work thru daily and I need to see if there is a code to autofill down thru a column, based on multiple statements throughout the column..here goes:

f1 msp
f2 msp
f3 blank **
f4 mct
f5 mct
f6 mct
f7 blank **
f8 cci
f9 blank **

Regardless of the actual f cell, I always will need to fill the Blank ** cell w/ the values from the previous cell....Hope this makes sense...& thanks in advance....
have_a_cup@cox.net

View 5 Replies View Related

How To Make File Path Independent

Dec 29, 2011

How can I make the files path independent. Lets say I have 6 workbooks, one of them having macro that connects all the six books. While working on my pc, I entered the file locations by myself. The macro runs fine.

Now I have to send the files to someone and would not like them to add their download directory at most places in the code. I want that after downloading, they have to only open the main file and press the button to run macro. How should I do that.

Right now am using this approach:-

sub main{
str 1file;
set 1file = Workbooks.Open ("c:/downloads...../1stfile.xls")

and similar code for calling other files.

View 2 Replies View Related

Update Cells From Two Independent Worksheets?

Apr 1, 2012

I have two spreadsheets which carry the same information in three cells. Instead of just placing a link, =B2 etc., I would like to have the cells linked to each other through code.

For the one sheet I can use this with no problem, but as soon as I place this worksheet change event in the other sheet but reverse the cells references Excel gets unhappy.

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range
Set rng = Target.Parent.Range("B2, M2, N2")

[Code]....

Any proper way to update a cell no matter which spreadsheet the change takes place?

Sheet1 >> change is made to cell B2 and that same value is applied to Sheet cell C4.

View 3 Replies View Related

Using Independent Column Format In One Sheet

Aug 22, 2006

I am working with two tables in one sheet. The first table requires seven columns. Under this table, i want to have another table that has 14 columns right under it so that their widths are the same. Is this possible? It would be like having two sheets in one.

View 2 Replies View Related

Sort Based On Two Independent Cells

May 22, 2007

In the attached spread sheet, i have two set of data, for two different months.Columns A to D have the value for the first month and columns F to I have the values for the second month. In the first set of Values i have the dollar value in the column "D" and in the second set of values i have the dollar value in column "F".

I want a macro, to compare these two cells and arrange the data accordingly. If both the values are the same, then both the lines corresponding to the values can remain in the same row. If one value is greater that other, then the set of values which have the lower dollar value should come to the next row. I have attachec the sample data. The lines highlighted in green is the raw data and the one in yellow is the finished data.

View 9 Replies View Related

Autofill Macro: Filling For Range Whilst There Is A Value In Cell

Nov 25, 2008

I recorded one for an autofill series which basically came out as

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved