Copying Formula With Cell Skips

Jul 1, 2014

I'm annualizing monthly returns. I have the formula for a specific year and would like to drag the formula down to annualize the monthly returns for the following years of data (1982-2013).

The monthly returns start in cell C4, with January 1982 and go down monthly in the C column.

My formula for annual returns is
for 1982 is {=PRODUCT(1+C4:C15)-1}
for 1983 is {=PRODUCT(1+C16:C27)-1}
for 1984 is {=PRODUCT(1+C28:C39)-1}
and so on.

How do I copy or drag the formula to annualize the rest of the years while keeping the pattern above without manually typing each year?

View 1 Replies


ADVERTISEMENT

When Dragging Formula Down The Formula Skips X Number Of Cells

Jul 22, 2014

Is it possible to write a formula that skips x number of cells and have the formula autoincrement as usual. For an examples lets say I want to skip 3 cells and I have entered in the cells listed:

A1= "1"
A2= "2"
A3= "3"

Then I type in the simple formula in the cell
B1= "=A1"

and then drag down but it skips 3 cells so then

B5= "=A2"

B9= "=A3"

If it didn't skip then
B1= "=A1"
B2= "=A2"
B3= "=A3"

this is just an example as I will be writing more complex formulas and need some thing that I can write into the formula so that it skips.

Something similar to this B1 "=A1(skip3cells)"

View 4 Replies View Related

Drag Down Formula That Skips 48 Cells

Apr 4, 2014

I want to put in cell I3 the value from cell C1, to I4 the value of C49 and so on. How can I do it?

View 5 Replies View Related

Sort Skips First Row

Jan 28, 2010

I am using the following code to sort a block of data by column B. The data starts in row 6.

View 2 Replies View Related

Copying Formula From Vba To Cell

Oct 27, 2008

I want to copy the following function via vba to a number of cells

=countif(i10:ah10,"does not comply")

i basically want row to do a a comparison from i10 to ah10, row 11 to do a comparison from i11 to ah11 and so on.

i tried this as a first step
[vbcode]
Workbooks(WorkBookFileName).Worksheets(TabID).Cells(m, fc + 8 + 1).formula = COUNTIF(I97:AH97,"does not comply")
[/vbcode]

but i got the error

"compile error: expected: list seperator or)

and i tried this one

[vbcode]
Workbooks(WorkBookFileName).Worksheets(TabID).Cells(m, fc + 8 + 1).text = "=COUNTIF(I97:AH97,"does not comply")"
[/vbcode]

and got the error compile error: expected : end of statement

i read some place to ensure that the reference is copied, one can use the following
[vbcode]
wks.Cells(i + 13, 7).FormulaR1C1 = wks.Cells(i, 3).FormulaR1C1
[/vbcode]
but cant get through the first step, where i actually use vba to make the first entry

View 9 Replies View Related

Copying A Cell To Cell Reference Created By A Formula

Jul 25, 2013

I have run an INDEX and MATCH formula to give me a resultant cell reference number. I now want to copy a cell to this specific cell reference using another formula.

For example the data I want to copy is in cell A1 and in cell A2 I have the result of the index formula (B1).

I know how to manually do a formula for this but wanting to know if there is a uniform formula that I can use that looks at the formula result of cell A2.

View 5 Replies View Related

Rows Not Visible: Enumeration Skips

Oct 8, 2008

I have a spreadsheet that shows is a break in the enumeration of the rows. To elaborate, rows are enumerated from 1 to 15, then after row 15 is row enumerated as 25 and continues to be enumerated as expected. In other words:

1, 2, 3, 4, ..., 14, 15, 25, 26, 27, ...

How can I get back rows 16 to 24 be visable again?

View 2 Replies View Related

Directory Listing: Skips .zip Files

Jun 10, 2006

I'm using a piece of code I found here on Ozgrid to create a list of files in a specific folder. And even though this worked fine for me a week ago, now when I run this same macro, the. zip files are left out of the list, even though I'm specifying msoFileTypeAllFiles. Archive files with other extensions, such as .tar.gz, do make the list. I get the feeling that my zip files are being considered folders instead of files. Do you have any idea why this is happening, or what to do to get that list of zip files?

Sub HyperlinkXLSFiles()
Dim lCount As Long
Application. ScreenUpdating = False
Application.DisplayAlerts = False
Application.EnableEvents = False
On Error Resume Next
With Application.FileSearch
.NewSearch
'Change path to suit
.LookIn = "o:DataFeeds"
.FileType = msoFileTypeAllFiles.....................

View 2 Replies View Related

Excel VBA - Copying Cell With Formula R1C1

Apr 13, 2012

I receive an run-time error message 1004 "autofill method of range class failed" in the following setting, in the 2nd line.

In this instance, I want to copy 1 cell from the cell 2 columns before.

Code:
Range("M3").FormulaR1C1 = "=RC[-2]"
Range("M3").AutoFill Destination:=Range("M3"), Type:=xlFillDefault

View 6 Replies View Related

Transferring And Copying Data From One Cell To Another Using Formula?

Dec 2, 2013

I have a database with different categories assigned to employees. I wan't to do the following. I will use just as an example, I want to some how accomplish: If Cell A in worksheet 1 equals cell C in worksheet 2, then replace Cell L in worksheet 2 from cell b in worksheet 1. Basically we have a database with phone numbers with corresponding purchase codes for each phone number and their names. The problem is, all the purchase codes are incorrect on the spreadsheet. We have an updated spreadsheet with just phone numbers and no names. I need to somehow pull the proper purchase code from one worksheet to the old document replacing the old purchase codes.

View 2 Replies View Related

Finding Last Cell And Copying Down Formula In Multiple Columns

Feb 11, 2013

I have the following code which works but only fills down one row and I want it to fill down to the last row but I cannot work it out.

Dim Col As Range
For Each Col In Range("L:Q").Columns
With Cells(Rows.Count, Col.Column).End(xlUp)
.Offset(1).Formula = .Formula
.Resize(2).FillDown
End With
Next

How to get it to copy down to the last cell in all the columns.

HKDDSHH
31-Jan-13
HUS
8
8
8
0
-896.469
637.037
-636.555
-895.987
January
2013
Comp
-112.059
Thursday
Midweek

[Code] ........

View 5 Replies View Related

Stop Formula Cell Reference Changing When Copying

Nov 1, 2006

I am trying to cut/paste a row of formulas in my spreadsheet. The problem is that I want some of the referenced cells in the formula to stay CONSTANT and not increment on each new row. In this example, I want the references to row 17 (F17,E17) to increment (E18,E19,...), but I want the "G7" reference to remain hard coded (as G7) on each row I paste (because that is where my master value is). (The formula is working fine) =IF((F17>0),IF((F17<=G7),E17,0),0)

View 3 Replies View Related

Using *.xls As Part Of A Loop: Skips The First Sub And Automatically Calls The PerthLocation Sub

Apr 15, 2009

I'm writing something similar to an auditing tool. I get a list of files from a pre determined directory. All these files are then listed on the spreadsheet. However, there is one file which has a different layout to the 88 other ones. I've written 2 subs (NonPerthLocation for the 88 stores, and PerthLocation for the 1 different sheet.) I'm trying to write a loop like the one below, however it skips the first sub and automatically calls the PerthLocation sub. In short, basically if the file has Loc 089 in any part of the filename, I want it to run the PerthLocation sub.

View 3 Replies View Related

Copying Formula From Cell To Cell

Aug 15, 2006

1. stores the selected range. I call this range as First Range.
2. Asks for a target cell location.
3. At the target location, it selects a range of the size same as that of First.
I call this range Second Range.
4. Copies the formulae of cells in First Range, to the corresponding cells in Second Range.

I am stuck at the step 4. I don't know how to copy contents between corresponding cells. For example, I don't know how to copy the formula of cell(1,1) in First Range to cell (1,1) of Second Range.

View 2 Replies View Related

Copying Formula To 8 Cells Lower With Result Of 1 Cell Lower?

Sep 30, 2013

create a formula copying a formula from cell a5 to a20 but i want the result to be 1 cell lower from a5's result

View 6 Replies View Related

Delete Rows: Macro Skips Rows

Nov 5, 2006

Need to solve my problem in the thread "Type Mismatch Error Message". Now a new problem has come up in the same code, so - according to the rules - I've started a new thread. (This one is most likely due to my poor knowledge of VBA syntax).

Sub Delete_invalid_rows()
Dim i%, j%
Dim Nr%, valid As Boolean, BYPdata As Boolean
Dim ar1 As Variant
Dim ar2 As Variant
Dim ar3 As Variant
Dim ar4 As Variant
Nr = 20
ar1 = Array(11, 14, 19, _
20, 22, 25, 26, 27, 28, 29, _
30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, _ .................

View 2 Replies View Related

Copying Formula From One Row To The Next Using VBA?

Mar 16, 2014

Using VBA; How do I copy a formula in a cell to the next row and at the same time incrementing the row numbers in the formula?

For instance: Formula in D1 is = A1 + B1 + C1

Copy the formula in D1 to D2 but then D2 must contain the formula = A2 + B2 + C2

View 2 Replies View Related

Formula For Copying... Only If Name Is The Same

Aug 13, 2009

How to make formula for following situation:

Worksheet1RangeA contains a list of names in A2:A50 with corresponding scores in B2:B50

These values per name should be copied into Worksheet2RangeB, which contains a larger range of names in A2:A100 and scores in B2:B100. The names have a different sequence than Worksheet1.

Is there an IF (or other) formula that can take a scores from Worksheet1, look for the corresponding names in Worksheet2 and copy the Worksheet1 scores into the Worksheet2 column, each for the correct name?

That means every name appearing in Worksheet1 will have a copy operation of the score to its corresponding name in Worksheet2. If a name in Worksheet2 does not appear in Worksheet1, the score colum in Worksheet2 will get 0 or a fixed value, say 25.

View 12 Replies View Related

Copying A Formula Down

May 8, 2007

I have a simple formula which refers to a cell on another sheet which I need to copy down a summary page so that every time I go down 2 cells in my summary it only moves down 1 cell in the sheet it refers to

Example

Sheet1 CellA1 = Sheet2!$A$1

when I copy this formula to Sheet1 CellA2 i need it to be = Sheet2!$A$3

obviously if I took the absolute references off and copied it down it would move 1 cell at a time but i need it to move 2

Not sure if this needs some code to work which I can assign to a Ctrl+? as I need to repeat the copy down over 100 times (however not limited to 100)

View 9 Replies View Related

Copying A Formula

Apr 28, 2009

I am trying to copy the following formula down to additional cells
='Drawing 1'!$D$13:$F$13

but each formula must change on each row so would be
='Drawing 2'!$D$13:$F$13
='Drawing 3'!$D$13:$F$13

View 9 Replies View Related

Copying Value Not Formula

Sep 20, 2006

I am using a formula to create a value. I copy the information to another sheet and want to sort the data another way. When I sort the data I lose the value. Is there anyway to just copy the value to the new sheet instead of the formula as well.

Sub points()
Range("H2").FormulaR1C1 = "1"
Range("H3").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-1]>=R[-1]C[-1],R[-1]C+1,1)"
Range("H3").Select
Selection.autofill Destination:=Range("H3:H450")
Range("H3:H450").Select
Range("A2:I450").Copy Destination:=Sheets("AllRaces").Range("A1354")
Sheets("AllRaces").Select
End Sub

View 2 Replies View Related

Copying Formula Down Row Without Getting VALUE Error

Aug 1, 2014

I'm building a master data spreadsheet to hold all of our data for the next fiscal year. There are about 300 data elements divided by month (our fiscal year is July-June). The intention is to go in monthly and enter data. How do I create the formulas and then copy them across the rows without getting the #VALUE! error or #DIV/0! error since I don't have data in the columns yet? Ideally, I'd like the formulas to live in the background and have the cells blank until I enter data for the particular month.

If it matters all my formulas are something similar to =IF(B4 = " ", " ", B4) or =IF(B4 = " ", " ", B4/B5)

View 2 Replies View Related

Copying Down An Indirect Formula

Aug 20, 2009

How can I copy down an indirect formula? When I copy it the lookup reference doesn't change. My formula is: =IF(INDIRECT("Q1")="",INDIRECT("R1"),INDIRECT("Q1"))

but when I copy down the cell reference stays the same (I need to keep the indirect formula because I'm adding columns in column Q but it needs to reference column Q even when columns are added). From reading through some other posts I believe I need to add a ROW() or COLUMN() formula in there somewhere.

View 5 Replies View Related

Copying Result Of Formula

Sep 10, 2009

I have a formula that returns a string using the concatenate function. Now I want to copy the string to another cell without copying the formula. The string will become a record in a CSV file. I cannot figure out how to make what shows on the screen a label cell instead of a formula cell.

View 3 Replies View Related

Adding And Copying Value, Not Formula

Nov 16, 2009

I need a code that looks through Column A (account numbers) then adds up the profit from Column X for each account number. The total profit for each account is then sent to different sheets. Account 100 profit sent to Sheet ‘S1’, Account 200 profit to Sheet ‘S2’, and so on…….The profit figure will go to Column C (Sheets S1,S2,S3..), in the next empty cell.

I have a code here that works, but problem is it places a formula in the cells in the output sheets. I dont want any formula there, just the value that is calculated. This is because everyday there will be new values in the 'Summary' sheet, and if the macro inserts the same formula everyday I data(profit figure) from the previous day gets distorted.

View 2 Replies View Related

Copying A Formula Result

Feb 27, 2007

copying a formula. Basically i want to paste special a formula result automatically.

I have a if function set up so when 2 days corespond then in the 3rd cell it records the value, however when ever the date changes the value disappears, i can keep the value u there by paste special but i would love to set this up as an automatic thing once a value is recorded it records the value and deletes the formula, or the value doesnt change when the date (thus the condition) changes...

View 14 Replies View Related

Copying And Manipulating Formula?

Oct 15, 2012

I am unsuccessfully trying to manipulate and copy a formula.

Column A would typically be used as a benchmark for one retailer and have the base price with the other columns simply showing differences in margin etc if the price was changed. This would typically mean the BWP and fixed terms etc would be constant.

However in this circumstance I need to ascertain for different retailers a,b,c,d, etc the shelf price and compare their NTS and % Margin. Whilst I can enter the different prices and change the terms as required, the whole sheet seems to link back to column A rather than simply drawing from the info in each respective column.

a
b
c

Price On Shelf
20.12
20.05
18.87

Shelf Price Excl. GST
17.50
17.43
16.41

[code]....

View 1 Replies View Related

Copying Formula Down In Sequence

Dec 11, 2012

I have two sheets in excel, one contains a list of names and the second is a basic lookup sheet for mail merge purposes.

Basically I want to write a formula in column A (of sheet 2) [current formula is =LabelNames!A2] and in column B the formula is =LabelNames!A3.

I want to drag these formulas down so each one jumps by 2... Ie:

=LabelNames!A2
=LabelNames!A4
=LabelNames!A6

View 4 Replies View Related

Copying A Formula By Dragging

Mar 3, 2007

I have obviously hit a combination of keys that has turned this function off. I can no longer drag and fill cells with a formula, it will only copy the original text/value into adjacent cells. How can I fix this??

View 9 Replies View Related

Copying Formula From One Sheet To Another

Sep 14, 2009

I have the following Formula in D2 which counts up and at the d5000 call it has...,

D2:
=IF(($A2 & $B2 & $C2 ""),IF(COUNTIF(CSM!$C$2:$C$5000,CCH!C2)>0,"YES","ADD TO CSM DATABASE"),"")
E2:
=IF(($A2 & $B2 & $C2 ""),IF(COUNTIF(Skyline!$C$2:$C$5000,CCH!C2)>0,"YES","ADD TO Skyline DATABASE"),"")
F2:
=IF(($A2 & $B2 & $C2 ""),IF(COUNTIF(Canada!$C$2:$C$5000,CCH!C2)>0,"YES","ADD TO Canada DATABASE"),"")


D5000:
=IF(($A5000 & $B5000 & $C5000 ""),IF(COUNTIF(CSM!$C$2:$C$5000,CCH!C5000)>0,"YES","ADD TO CSM DATABASE"),"")

E5000:..............

View 9 Replies View Related







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