Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Is there a way to write an Excel function so it can read a variable and use
it as a reference? For instance, to read a value from cell C1 in Sheet2 to A1 in Sheet1 I would write the following function in A1: =Sheet2!C1 But let's say I programmed a calculation that will give me an answer to cell B1 in Sheet1, where the answer could be either Sheet2, Sheet3 or Sheet4. How do I write the new function in cell A1 so it will use the result in B1 in it's function, for instance; =(Value in B1)!C1 |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
If Sheet1 A1 = "Sheet2"
The below formula will return A1 of Sheet2 =INDIRECT(A1 & "!A1") If this post helps click Yes --------------- Jacob Skaria "Wildebraam Production" wrote: Is there a way to write an Excel function so it can read a variable and use it as a reference? For instance, to read a value from cell C1 in Sheet2 to A1 in Sheet1 I would write the following function in A1: =Sheet2!C1 But let's say I programmed a calculation that will give me an answer to cell B1 in Sheet1, where the answer could be either Sheet2, Sheet3 or Sheet4. How do I write the new function in cell A1 so it will use the result in B1 in it's function, for instance; =(Value in B1)!C1 |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Some sheet names need to be surrounded with single quotes.
=indirect("'" & a1 & "'!c1") If the single quotes aren't required, this'll still work. Wildebraam Production wrote: Is there a way to write an Excel function so it can read a variable and use it as a reference? For instance, to read a value from cell C1 in Sheet2 to A1 in Sheet1 I would write the following function in A1: =Sheet2!C1 But let's say I programmed a calculation that will give me an answer to cell B1 in Sheet1, where the answer could be either Sheet2, Sheet3 or Sheet4. How do I write the new function in cell A1 so it will use the result in B1 in it's function, for instance; =(Value in B1)!C1 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Variable file reference | Excel Worksheet Functions | |||
A function to get a variable row reference for range in XNPV funct | Excel Worksheet Functions | |||
How to use variable in reference | Excel Worksheet Functions | |||
MIN Function w/ variable address reference | Excel Worksheet Functions | |||
Problem with =sum(offset(cell reference,w,x,y,z). I want cell reference to be variable | Excel Worksheet Functions |