Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 64
Default using a cell's reference to return a value.

Hi All,

E.g. in cell A1, sheet1, I have =sheet2!D12 to reference whatever is in
sheet 2, cell D12.

I want a formula that looks into A1 to see what is referenced and then
return the cell 3 rows down from it.

so cell A2 - =sheet2!D15
cell A3 - =sheet2!D18
cell A4 - =sheet2!D21.

I know this is possible using INDIRECT but is it possible to build a dynamic
formula to work for any cell, so that the formula looks at what is referenced
in the cell above (e.g. A3 looks into A2, B17 looks into B16) and then
refences the cell 3 rows down from it as shown above.

Any help would be much appreciated.

Thanks,

B/

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default using a cell's reference to return a value.

One way

First, install this GetFormula UDF from David McRitchie's:
http://www.mvps.org/dmcritchie/excel/formula.htm

Function GetFormula(Cell As Range) As String
GetFormula = Cell.Formula
End Function

Then, with A1 containing: =Sheet2!D12
you could place in A2:
=OFFSET(INDIRECT(MID(getformula($A$1),2,99)),ROWS( $1:1)*3,)
and copy down to return required results.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Bhupinder Rayat" wrote:
Hi All,

E.g. in cell A1, sheet1, I have =sheet2!D12 to reference whatever is in
sheet 2, cell D12.

I want a formula that looks into A1 to see what is referenced and then
return the cell 3 rows down from it.

so cell A2 - =sheet2!D15
cell A3 - =sheet2!D18
cell A4 - =sheet2!D21.

I know this is possible using INDIRECT but is it possible to build a dynamic
formula to work for any cell, so that the formula looks at what is referenced
in the cell above (e.g. A3 looks into A2, B17 looks into B16) and then
refences the cell 3 rows down from it as shown above.

Any help would be much appreciated.

Thanks,

B/

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 64
Default using a cell's reference to return a value.

Mate that is genius! Thanks so much and happy new year...

"Max" wrote:

One way

First, install this GetFormula UDF from David McRitchie's:
http://www.mvps.org/dmcritchie/excel/formula.htm

Function GetFormula(Cell As Range) As String
GetFormula = Cell.Formula
End Function

Then, with A1 containing: =Sheet2!D12
you could place in A2:
=OFFSET(INDIRECT(MID(getformula($A$1),2,99)),ROWS( $1:1)*3,)
and copy down to return required results.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Bhupinder Rayat" wrote:
Hi All,

E.g. in cell A1, sheet1, I have =sheet2!D12 to reference whatever is in
sheet 2, cell D12.

I want a formula that looks into A1 to see what is referenced and then
return the cell 3 rows down from it.

so cell A2 - =sheet2!D15
cell A3 - =sheet2!D18
cell A4 - =sheet2!D21.

I know this is possible using INDIRECT but is it possible to build a dynamic
formula to work for any cell, so that the formula looks at what is referenced
in the cell above (e.g. A3 looks into A2, B17 looks into B16) and then
refences the cell 3 rows down from it as shown above.

Any help would be much appreciated.

Thanks,

B/

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default using a cell's reference to return a value.

welcome, glad it worked for you.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Bhupinder Rayat" wrote in
message ...
Mate that is genius! Thanks so much and happy new year...



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CHANGE ONE CELL'S VALUE AND GET THE SAME RETURN - SOME HELP PLEASE Vangelo Excel Discussion (Misc queries) 3 October 27th 07 09:41 PM
Return cell reference instead of value lmason Excel Discussion (Misc queries) 1 August 23rd 06 05:53 AM
Return value in cell above the reference Jean Excel Discussion (Misc queries) 4 May 31st 06 07:50 PM
Changing named range reference depending on a cell's content cparaske Excel Discussion (Misc queries) 1 July 29th 05 07:06 PM
check if reference exists, then return its value or return 0 doudou Excel Worksheet Functions 1 June 4th 05 09:17 PM


All times are GMT +1. The time now is 09:20 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"