You are here:

# Excel/Return value from table

Question

Jpeg file
Dear Tom,

I have a table in sheet2 with header (In Row 2) such as 32, 68, 1045, 3600, 4580 and beneath that column contains a set of numbers (See image alongside)

Now in sheet1 i have number 68 in cell C7 and 21712 in E7. Number 68 is changeable in any one of the numbers in the header(Row2). Also 21712 can be any number.

Help me to write formula in cell F7 to find the exact number or next immediate higher number entered in E7 based on number in C7 from the table in sheet2.

If C7 = 68 and E7 = 21712 then the answer in F7 should be 22400.

Nabam,

this worked for me given your description and picture:

=OFFSET(Sheet2!\$A\$3,MATCH(\$E\$7,OFFSET(Sheet2!\$A\$4,0,MATCH(\$C\$7,Sheet2!\$B\$2:\$H\$2,0),30,1),1)+IF(OFFSET(Sheet2!\$A\$3,MATCH(\$E\$7,OFFSET(Sheet2!\$A\$4,0,MATCH(\$C\$7,Sheet2!\$B\$2:\$H\$2,0),30,1),1),MATCH(C7,Sheet2!\$B\$2:\$H\$2,0),1,1)=\$E\$7,0,1),MATCH(\$C\$7,Sheet2!\$B\$2:\$H\$2,0),1,1)

30 is the number of rows in your data on sheet2 (not counting the header and the blank row below it).   So change the 30 to match the number of rows of data you have. (you show 26 in your image, but I used 30).

--
Regards,
Tom Ogilvy
Questioner's Rating
 Rating(1-10) Knowledgeability = 10 Clarity of Response = 10 Politeness = 10 Comment As always superb!

This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

#### Tom Ogilvy

##### Expertise

Selected as an Excel MVP by Microsoft since 1999. Answering Excel questions in Allexperts since its inception in 2001. Able to answer questions on almost all aspects of Excel's internal capabilities. If seeking a VBA solution, please specify that in your question itself so I give you the answer you want. [Excel has weak protection - if you are distributing an application, I don't answer questions on how to protect your project from your users.]

##### Experience

Extensive experience.

Education/Credentials
Master of Science (MS) degree Operations Research (ORSA)

Awards and Honors
Microsoft MVP in Excel.