Save As Macro To Repeat Using Formula For Future Months

May 20, 2013

Keep getting compile error.

Sub CreatingCT()
' CreatingCT Macro
Dim ConsolidatedTrend As String

'Path to File
ConsolidatedTrend = "(d:2013"&(IIF((MONTH(NOW())+1>9),"(1","(0")&(MONTH(NOW())+1)&") "&TEXT(DATESerial(YEAR(NOW()),(MONTH(NOW())+1),1),"MMM")&"Consolidated Trend - "&YEAR(NOW())&" "&MONTH(NOW())+1&" + "&(12-(MONTH(NOW())+1))).xlsb)"
ActiveWorkbook.SaveAs Filename:=ConsolidatedTrend, FileFormat:=xlExcel12, CreateBackup:=True
End Sub

View 5 Replies


OR Or IF Adding: Display A Date 3 Months In Future?

Nov 19, 2009

Three columns.

A - Date last checked
B - Due Date
C - Actual Date checked

Currently column B simply has =A+84 and will display a date 3 months in future.. Great..

However now i want column B to still display the 3 month date - unless there is a date in C, whereby i want B to then display OK. SO what im sort of needing is =A+84 (or if somethings in C then "OK")

View 3 Replies View Related

How To Translate Number Of Months Into Future Date

Dec 9, 2009

I've developed a spreadsheet in Excel 2000 where one of the cells contains the number of months a quantity will last, calculated by taking the total amount and dividing it by the amount used each month (a constant).

I would like to have another cell where that number is translated into the future date that number of months represents, so that in addition to seeing how many months the total amount will last, one can see when the amount will be depleted.

For example, suppose it is December 9, 2009 (as it is now) and the number in the number-of-months cell is 6. Then, is there a way that when 6 is calculated, in another cell appears something like June 9 2010 or 6/9/2010 or 6/9/10 (assuming the computer's clock is correct)?

It would be nice if the formula would handle decimals too, such as the date for 6.4 months, but that's not essential.

View 9 Replies View Related

Variable Dates In The Future - Formula

Jul 15, 2008

How can I create a formula to calculate a future date, when it is not a “specific day” in the future? I mean, I have today's date (Jul 15/08) and I need to calculate from that, when it will be the first Monday of November in 2009.

View 9 Replies View Related

Formula To Referencing Future Worksheet

Aug 19, 2009

Reference a worksheet that has not yet been created, avoiding the #REF! result?

The formula I have is correct, however the macro generates new worksheets throughout the month in which the totals sheet is referencing. The problem being that the totals sheet is referencing worksheets not yet created.

View 9 Replies View Related

Use Excel To Create A Formula To Predict Future Outcomes?

Jan 17, 2014

So I have some stats I have been tracking for NHL hockey games. I want to find a formula that is predictive of future outcomes, based on whether or not a team has a statistical advantage. Obviously, there are so many other factors, and there is no golden formula to accurately predict the winner of ever game. I want to find maybe a 70% success rate here. I want to be able to plug in all of the stats, and essentially have it tell me who statistically should win the game.

I have 11 independent variables (Stat A, B, C, D, E, etc.). I have a running total of how often the winning team had the stat advantage for each of these, and I think that should factor into the formula. My dependent variable is whether the team wins or not. how to do that with multiple independent variables.

View 3 Replies View Related

Repeat VBA Formula

Dec 15, 2008

How do I keep repeating

If Range("E22").Value Range("G3").Value Then
Selection.Delete Shift:=xlUp

Until E22 does = G3

Then I need it to go to Row 23 and do the same.

My goal is to leave only rows (between rows 22 and 50) that have the same value in its column E that match cell G3.

View 9 Replies View Related

Macro - Repeat Macro A Specific Number Of Times

Aug 22, 2008

I have created a macro that copies the outcome of a specific calculation (that is driven by random numbers) and pastes it (as values) into a seperate table. It then recalculates the sheet, copies the new outcome and pastes it into the same table at a row beneath the previous one.

However, I would like to be able to determine how many times this loop is repeated (i.e. how many rows of outcomes will be generated) without having to change the macro each time. Is this possible? Maybe by just linking it to a cell where the number of outcomes/repeats is specified.

View 9 Replies View Related

Not Repeat The Same Formula In Each Cell, Over And Over Again

Feb 27, 2009

I have a 34-page workbook. On Every Row (starting on line 4), and on Every Page (except the first "Summary" page) is repeated, this same formula....over and over again in column "N":


So, since this keeps repeating over and over again, is there some way (either by formula, macro, or whatever), that I can prevent the constant repeating on every line, to bring the file size back down? [Note: This formula alone actually added almost 5MB to the file size!]

Two things to know:
- The formula above is seen on row 4 (that's why you see "4" all over the place). On Row 5, it would be "5" instead, and so on...
- The formula above always starts on row 4, and goes down to the "last used" row, in column "N" (so there's other information in that last used row as well).

....hopefully this is a very easy thing to do?

(PS: Thanks PeterSS for the help creating the above formula in the past...hopefully it can now be made less repetitive to conserve ~5MB of file space!)

View 10 Replies View Related

Repeat Macro To Last Row

Mar 20, 2012

I am trying to repeat this macro until the last row of data present in column "D".

Sub inserttext()
' inserttext Macro
ActiveCell = "Test Description:" & Chr(10) & "" & Chr(10) & "Expected Results: ERROR level fires stating " & ActiveCell
End Sub

View 4 Replies View Related

Macro To Repeat

Feb 5, 2008

I have a workbook with 4 worksheets. I have a macro ( Cntrl + U ) that runs a series of steps and prints the results with it ending on the beginning page. This works well but I want it to repeat the macro until it reaches a blank cell on the starting page.

View 9 Replies View Related

Repeat Column Of Data Down A Row Using A Formula?

Jun 9, 2014

I'm trying to create a formula (if possible) that will repeat column headers down a row and repeat every nth time. I have text values in cells E6:AL6 and would like to use a formula that will make it so that E6 will show up B2, F6 will show up in B3, G6 will show up in B4, etc. And then when it gets to B35 (AL6), B36 will then revert back to E6, and the loop will continue - B37 will be F6, B38 will be G6, etc.

My thought is to create an offset/address of some sort that will read as OFFSET(E6,0,x+1) and if x>35, start back at 0. However, I don't think you can create such a formula using an offset?

View 5 Replies View Related

Repeat A Formula Automatically Every Seven Columns

Feb 19, 2010

I have a formula that is working, but I want to repeat it every seven columns. I know I can drag it and release it (or drag a few and release them in the appropriate column), but at this point I have so many columns that it's quite cumbersome to do that. Is it possible to create a macro that will automatically repeat the formula in every cell seven columns to the right (the same row for all)?

My formula is in cell K7 is:


Now I want that formula to repeat (with the proper adjustments) for cell R7, i.e.:

and then to automatically continue like that for cells Y7, AF7, AM7, and so on.

View 6 Replies View Related

VBA Formula To Repeat Down Rows Until Nothing In Cell

Aug 27, 2013

how to get it to fill down. Basically depending on the contents of column D, a formula (which also needs to fill with the rows) is copied from sheet 2 in to column K.

Sub Copy()
With Sheets("sheet1")
typ = .Cells(Rows, Count, "D").End(x1Up).Row


That's what I have. I am totally stuck. the formula needs to relate to column G and fill down too. this is the formula

HTML Code:

View 2 Replies View Related

Repeat A Macro Until End Of Workbook

Aug 29, 2009

can I add to a macro that will repeat that macro on every subsequent worksheet in the workbook.

View 4 Replies View Related

How To Repeat Excel Macro

Apr 19, 2014

How to repeat excel Macro?

View 11 Replies View Related

Repeat VLookUp For Each Row In Macro

Feb 6, 2014

I am trying to do a vlookup within a macro.

However this always shows the first result in the first row but the rest of the rows just show #REF.

I want it to look up 100's or rows and shows either the result or N/A

Once I create the macro this is what the VBA is telling me: [Code] ......

View 3 Replies View Related

Macro To Repeat Number Set?

Mar 9, 2014

I have many set of numbers in column A and Coulmn B each set separated by space.I need to repeat each set to n number of times.

View 14 Replies View Related

Macro To Repeat On All Rows, Not Just The First One

Jul 6, 2007

This macro is recorded, but I need it to start on row 2 and repeat down to row 3000. What changes do I need to make.

View 13 Replies View Related

Get Macro To Repeat Itself Then Stop?

Mar 13, 2012

I'm trying to create a macro to input information into a cell then repeat until the information stops.

So say I have 10 rows of information that fill up A1:D10. in E1:E10 I'd like a macro to insert some data into E1 then go to E2 and do the same until the end and then stop. So since A11:D11 would be blank the formula would just stop.

I actually work on 100's of cells a day and this is for a bigger project I'm trying to put together or I would just drag.

View 7 Replies View Related

Pulling Multiple Matches (formula Repeat?)

Aug 21, 2009

I'm looking for is to repeat this formula within the cell, so that it can pull the information of not only the first match, but all matches proceeding it. Right now it only pulls the first match it finds, but I would like it to add every time a row matches the criteria of the formula.

=(LOOKUP(2,1/(('Paste SFHS'!$A$2:$A$9=A2)*('Paste SFHS'!$B$2:$B$9="08-Wave/Stu. Goals")),'Paste SFHS'!$C$2:$C$9))

View 5 Replies View Related

Repeat Vlookup And Find Or Search Formula

Feb 4, 2009

I have a column of text strings in a2.a??? this is my data. Each text string has a persons name somewhere in it with other text around it.

In column c2.c??? i have text names of people names im searching for. eg. bob,jane,harry

what would be a pratical use of the vlookup function to return the name in column b2.b??? if the name from C was located in the string in A this is a non case sensertive requirement.

View 9 Replies View Related

Repeat Insert Row And Formula For Selected Cells

Jul 8, 2009

I am in the process of developing a budget template for next year and here is what I want to accomplish through Macro to avoid the tedious mannual manipulation process (hope that's achievable). BTW, I am only an entry-level Macro user who has no background in coding.

I have attached an Excel sample but let me explain:

In each of the expenses tabs (1, 2, and so on (only 1, 2 given in the sample)), I want to be able to select a range of the data cells (A19:Q34 in "Expense 1" and A10:Q28 in "Expense 2") and run this Macro so that:

1. 10 blank rows be inserted between selected data rows

2. A sum created for each month from the four rows below) with different color

3. A Year to Date Actual and To Year End Forecast created based on the VLOOKUP of the "P&L" matching the account code by month

4. Finally grouping of the first 9 rows.

the above is what I have manually created for the first account code in the "expense 1" tab. I have 7-8 expenses groups and about 200 account codes. So mannually creating the above for each expense groups is not that terrible if this will make life easier for Macro.

I would think this is a very typical Macro issue but can't really come up with anything.

The other issue I ran into the VLOOKUP for the YTD Actual and TYE Forecast. It is to look up accont code in the "P&L" tab and match the #s. But the column numbers in the VLOOKUP do not change automatically when I copy across. Thus I have to change mannually, which is really a pain in the butt. I also know I can't copy down because that will change the account code that I want it to match. Because to be able to copy the VLOOKUP formula across the same account code, I need to use the $ to fix the account code. But to copy down I think I need that to be without the $ sign. Any solution on that?

View 9 Replies View Related

Auto Run Macro To Repeat Daily

Sep 3, 2012

This auto run macro does not seems to run/repeat itself daily. I can't figure out why am I missing something? My end result should be that these reports run at the times listed on the macro every day 24/7. The spreadsheet will be on a computer that is never off.

Private Sub Workbook_Open()

Application.OnTime TimeValue("8:00:00"), "AThirdshift"
Application.OnTime TimeValue("8:00:00"), "BThirdshift"
Application.OnTime TimeValue("8:00:00"), "CThirdshift"

[Code] .......

View 1 Replies View Related

Repeat Macro From User Input

Jun 14, 2008

I have a very simple macro for recalculating formulas and printing the page.

I need a way to show an input box where the user can say how many times to repeat the process i.e. 2x = recalculate, print, recalculate, print.

View 11 Replies View Related

Repeat Macro Set Number Of Times?

May 11, 2012

I'm trying to repeat a macro a set number of times depending on the number a person inputs into cell B3.

Here it is currently:
Selection.Insert Shift:=xlToRight

View 4 Replies View Related

Simple Macro To Repeat On Next Row On Same Columns

Jan 22, 2014

I've recorded a macro which selects a few cells in a row, copies them and pastes them again over the same cells (special paste - only values), and I've attached this macro to a button.

I would like the macro to repeat the same action on the next row for the same columns, each time the button clicked.

How to update the macro to move to the next row each time initiated?

View 5 Replies View Related

Code To Repeat Macro Command

Nov 21, 2008

I haven't worked much with macros and the work I have had to do so far I have been able to figure out by searching forums such as this one. However, I need this community's help with what I am currently working on. Here's the code I have so far:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("E2:E2")) Is Nothing Then
Exit Sub
Selection.AutoFill Destination:=Range("D1:D2"), Type:=xlFillDefault
End If
End Sub

I need this code/behavior to repeat in cells E3:E10, skip a couple rows, then repeat in E13:18 skip a couple more rows, repeat in E16:E21, etc.

Version: Excel 2000
OS: XP Pro

View 9 Replies View Related

Macro To Transpose Data And Repeat Itself

Nov 27, 2008

I have spreadsheet which consists of two columns of data.

Column A contains a gerneric heading/group and Column B details some results for each heading/group; these results cover between 16 to 40 rows.

Basically, I need to transpose each heading/group's rows of results data into the same row as the heading/group row; then delete the rows where the results data was copied from; then I want to go to the next heading/group in Column A and repeat the process - transposing the results into a row.

I have written a simple macro which seems to work intermittingly - one which doesn't repeat or loop though. Sometimes I get the Runtime Error 1004 and sometimes the macro overwrites the transposed row if the results are listed over 16 rows.

My draft macro code is as follows:

Sub Transpose()
' Transpose Macro
' Macro recorded 27/11/2008 by Hunter
' Keyboard Shortcut: Ctrl+p............

View 9 Replies View Related

Repeat Macro In Adjacent Column

Jan 15, 2010

Sub For_Adam()
For x = 1 To Range("G7")
ActiveCell.Offset(x, 0).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

Next x
Application.CutCopyMode = False
End Sub

Now all I want is for this to be repeated in the next column, so everything is exactly the same but it doesn't start in B15, but starts in C15, then D15 etc.

View 9 Replies View Related

Copyrights 2005-15, All rights reserved