I was wondering if it was possible to specify a cell with a function. For example, if you put in a value of 1, it will give you the value of H1. If you input 2, it will give you H2, and so on.
Hi,
welcome to the forum.
=INDIRECT("H"&A1)
where A1 is the number you specify
teylyn
Microsoft MVP - Excel
At Excelforum, you can say "Thank you!" by clicking theicon below the post.
Avoid pie charts with more than two data points. Why? See here (pdf, 559 kb). The only acceptable pie chart is here.
Hi,
If I understand you correctly you are wanting to enter a constant and after entry have it change to a formula to evaluate the contents of H1. You can't do this.
You can put 1 in a cell (say E2) and then in another cell enter the formula
=INDIRECT("H"&E2)
which will result in the value in H1, H2 etc.
HTH
Richard Buttrey
If this was useful then please rate it appropriately.
Click the small star iconat the bottom left of my post.
Both Teylyn and RB use Indirect, nothing wrong with that !
=INDEX(H1:H100,E1,1) will do the same, where E1 (again) is your constant
Another possibility is to use =OFFSET(H1,E1-1,0)
Looking for great solutions but hate waiting?
Seach this Forum through Google
www.Google.com (e.g. +multiple +IF site:excelforum.com/excel-general/ )
www.Google.com (e.g. +fill +combobox site:excelforum.com/excel-programming/ )
Ave,
Ricardo
Thanks a lot. I'm sorry if I was unclear, but I did want the constant in another cell. Indirect is what I needed. How do I set this to solved now (or can I)?
Last edited by dfinlay; 02-16-2010 at 02:56 AM.
FWIW, unless the sheet reference is itself variable I would suggest using Ricardo's INDEX rather than INDIRECT given the latter is Volatile and the former is not.
(OFFSET too is Volatile).
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks