Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() I have a data base of thirty rows. I need to be able to access any one of these rows depending on the input number. eg If the input is 1, I need to access row 17...if the input is 2, I need to access row 18 and so on. How can I accomplish this without using thirty IF-Then statements. I was told that I needed to use a Query but do not know how. Any help would be appreciated aschmitz -- aschmitz ------------------------------------------------------------------------ aschmitz's Profile: http://www.excelforum.com/member.php...o&userid=32239 View this thread: http://www.excelforum.com/showthread...hreadid=525981 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() There are several functions you can use in this situation. One I like to use is the Offset statement. =offset(HomeCell,Row Offset,Column Offset) In your example, assuming the database is contained in cells A17 to Z47, you would set cell $A$16 as your home cell. =Offset($A$16,0,0) would then return the contents of cell A16 =Offset($A$16,1,0) returns the contents of cell A17 =Offset($A$16,1,1) returns the contents of cell B17 =Offset($A$16,2,1) returns the contents of cell A18 Now If you set cell A1 as your input cell, you can substitute $A$1 for the number after the first comma. When you enter a number into Cell $A$1, the formula will look up a value in the desired row of your database. -- CaptainQuattro ------------------------------------------------------------------------ CaptainQuattro's Profile: http://www.excelforum.com/member.php...o&userid=32763 View this thread: http://www.excelforum.com/showthread...hreadid=525981 |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Captain Quattro, Thanks for the help. That worked out very nicely!!! aschmitz -- aschmitz ------------------------------------------------------------------------ aschmitz's Profile: http://www.excelforum.com/member.php...o&userid=32239 View this thread: http://www.excelforum.com/showthread...hreadid=525981 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
changing query source | Excel Worksheet Functions | |||
enable automatic refresh | Excel Worksheet Functions | |||
AHHH! Again | Excel Discussion (Misc queries) | |||
"Query cannot be edited by the Query Wizard" | Excel Discussion (Misc queries) | |||
How to use a Access Query that as a parameter into Excel database query | Excel Discussion (Misc queries) |