ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Finding a value in a cell matching up with a column/row (https://www.excelbanter.com/excel-programming/399426-finding-value-cell-matching-up-column-row.html)

BZeyger

Finding a value in a cell matching up with a column/row
 
I am tring to figure out how to find a value in a cell. the first Column a
wold consists of values and the first row would be the year. I need to find
the value that corrospondes with teh year.
For Example

2005 2006 2007 2008

Price 2 3 4 5

Rate 4 5 7 2

Total 8 15 28 10

I need to find the value of the Total in 2007

How can this be done? either by code or by formula.

Chip Pearson

Finding a value in a cell matching up with a column/row
 
If you have your year numbers in A1:E1 and your Price/Rate/Total headers in
A2:A5, then the following formula will return the Price for 2007.

=OFFSET(A1,MATCH("Price",A2:A5,0),MATCH(2007,A1:E1 ,0)-1,1,1)


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)



"BZeyger" wrote in message
...
I am tring to figure out how to find a value in a cell. the first Column a
wold consists of values and the first row would be the year. I need to
find
the value that corrospondes with teh year.
For Example

2005 2006 2007 2008

Price 2 3 4 5

Rate 4 5 7 2

Total 8 15 28 10

I need to find the value of the Total in 2007

How can this be done? either by code or by formula.




All times are GMT +1. The time now is 07:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com