Formula to lookup info in a table

  • Thread starter Thread starter James
  • Start date Start date
J

James

if the left column is Bill, John, Joe
and the column headers are Jan, Feb, Mar.....
and the table is named Sales

A1 is named Salesman and contains John,
A2 is named Month and contains Mar
What is the best formula to lookup John's sales in March?
 
Best way:

Pivot Table

Formula way:

=VLOOKUP(A1,Sales,MATCH(TEXT(A2,"mmm"),OFFSET(Sales,,,1,),0),0)
 
James,

Create 2 more named ranges

SalesMonths - the 12 month cells (not the one to the left above the names)
SalesNames - all of the names, again not the cell above

and then use

=INDEX(Sales,MATCH(A1,SalesNames,0)-1,MATCH(A2,SalesMonths,0)+1)

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
shouldn't the first match be +1 vice -1? if the first name were the
match, match would return 1, but this would be Index 2 for the SALES table.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top