ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Function with offset (https://www.excelbanter.com/excel-programming/372884-function-offset.html)

[email protected]

Function with offset
 
I am trying to get values from sheet1 and place them on sheet2. Each
cell on sheet1 is exactly 48 rows down from the previous cell. The
Offset function seems to work but I need an easy way to get the correct
formula in each cell in sheet2. This is what I have come up with so
far:

Sheet2 cell B3 contains this function: =sheet1!G11
Sheet2 cell B4 contains this function: =Offset(sheet1!G11,48,0)
Sheet2 cell B5 contains this function: =Offset(sheet1!G11,96,0)

Is there some formula that I can use to keep adding 48 to the previous
cell number until I reach Sheet2 cell B55? I would like to be able to
click and drag the formula to all of the cells on Sheet2. There may be
a completely different approach that I should take. Any help would be
appreciated.


NickHK[_3_]

Function with offset
 
Does this work ;
=Offset(sheet1!G11,(ROW()-3)*48,0)

NickHK


groups.com...
I am trying to get values from sheet1 and place them on sheet2. Each
cell on sheet1 is exactly 48 rows down from the previous cell. The
Offset function seems to work but I need an easy way to get the correct
formula in each cell in sheet2. This is what I have come up with so
far:

Sheet2 cell B3 contains this function: =sheet1!G11
Sheet2 cell B4 contains this function: =Offset(sheet1!G11,48,0)
Sheet2 cell B5 contains this function: =Offset(sheet1!G11,96,0)

Is there some formula that I can use to keep adding 48 to the previous
cell number until I reach Sheet2 cell B55? I would like to be able to
click and drag the formula to all of the cells on Sheet2. There may be
a completely different approach that I should take. Any help would be
appreciated.




Die_Another_Day

Function with offset
 
Dim cnt as Long
Sheets("Sheet2").Range("B3").Formula = "=Sheet1!G11"
For cnt = 4 to 55
Sheets("Sheet2").Range("B" & cnt).Formula = "=Offset(Sheet1!G11," &
_
(cnt - 3) * 48 & ",0)"
Next

Charles Chickering
wrote:
I am trying to get values from sheet1 and place them on sheet2. Each
cell on sheet1 is exactly 48 rows down from the previous cell. The
Offset function seems to work but I need an easy way to get the correct
formula in each cell in sheet2. This is what I have come up with so
far:

Sheet2 cell B3 contains this function: =sheet1!G11
Sheet2 cell B4 contains this function: =Offset(sheet1!G11,48,0)
Sheet2 cell B5 contains this function: =Offset(sheet1!G11,96,0)

Is there some formula that I can use to keep adding 48 to the previous
cell number until I reach Sheet2 cell B55? I would like to be able to
click and drag the formula to all of the cells on Sheet2. There may be
a completely different approach that I should take. Any help would be
appreciated.




All times are GMT +1. The time now is 02:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com