Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Formula to lookup info in a table

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?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Formula to lookup info in a table

=INDEX(SALES,MATCH(A1,INDEX(SALES,0,1),0),MATCH(A2 ,INDEX(SALES,1,0),0))

--
Regards,
Tom Ogilvy

"James" wrote in message
...
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?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Formula to lookup info in a table

Best way:

Pivot Table

Formula way:

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



In article ,
"James" wrote:

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?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Formula to lookup info in a table

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)

"James" wrote in message
...
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?



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Formula to lookup info in a table

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.

--
Regards,
Tom Ogilvy

"Bob Phillips" wrote in message
...
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)

"James" wrote in message
...
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?







  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Formula to lookup info in a table

Yeah, you are right. Your answer is better anyway.

Bob

"Tom Ogilvy" wrote in message
...
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.

--
Regards,
Tom Ogilvy

"Bob Phillips" wrote in message
...
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)

"James" wrote in message
...
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?







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula help- Lookup table Peri Excel Discussion (Misc queries) 1 February 12th 10 08:31 PM
Lookup info in one Column and then returning info in other columns Cyndi513 Excel Worksheet Functions 1 June 23rd 08 02:36 PM
enter info in table...possible formula carrie Excel Discussion (Misc queries) 7 March 21st 06 06:20 PM
What formula can I set up to do a cross lookup in an Excel table? grigorovag Excel Worksheet Functions 1 November 28th 05 01:42 PM
formula to lookup table in another Worksheet please Steved Excel Worksheet Functions 1 June 14th 05 10:39 AM


All times are GMT +1. The time now is 12:05 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"