Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default MATCH function in a VLOOKUP

Hi,

I am trying to determine the column index number in a vlookup with a matcxh
function but I'm getting an #N/A error message.

The table I am looking up may change in shape (e.g. not always the same
number of rows or columns) so I have given this a name range.

The table (called NAME_RANGE) is basically

ZZ YY XX
A 10 40 70
B 20 50 80
C 30 60 90
TOTAL 60 150 240

The formula I am using is more or less:

=VLOOKUP("TOTAL",NAME_RANGE,MATCH("YY",NAME_RANGE) ,FALSE)

I should get 150.

What have I done wrong?

Cheers
TT

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 605
Default MATCH function in a VLOOKUP

Regarding the MATCH function, do you want match_type to be 0 or FALSE i.e. exact match? How is the table sorted?

************************************************** **************************************
Following from Excel Help:-

If match_type is omitted, it is assumed to be 1.
If match_type is 1, MATCH finds the largest value that is less than or equal to lookup_value. Lookup_array must be placed in ascending order.

If MATCH is unsuccessful in finding a match, it returns the #N/A error value.
************************************************** **************************************
Have you tried to use evaluate formula to watch the steps unfold?
Interesting formula. I'll go and explore some more now while we wait for the experts' advice.

Epinn

"trevor_tito" wrote in message ...
Hi,

I am trying to determine the column index number in a vlookup with a matcxh
function but I'm getting an #N/A error message.

The table I am looking up may change in shape (e.g. not always the same
number of rows or columns) so I have given this a name range.

The table (called NAME_RANGE) is basically

ZZ YY XX
A 10 40 70
B 20 50 80
C 30 60 90
TOTAL 60 150 240

The formula I am using is more or less:

=VLOOKUP("TOTAL",NAME_RANGE,MATCH("YY",NAME_RANGE) ,FALSE)

I should get 150.

What have I done wrong?

Cheers
TT


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,688
Default MATCH function in a VLOOKUP

Is NAME_RANGE a dynamic range?

Try this:

=VLOOKUP("TOTAL",NAME_RANGE,MATCH("YY",INDEX(NAME_ RANGE,1,),0),FALSE)

Biff

"trevor_tito" wrote in message
...
Hi,

I am trying to determine the column index number in a vlookup with a
matcxh
function but I'm getting an #N/A error message.

The table I am looking up may change in shape (e.g. not always the same
number of rows or columns) so I have given this a name range.

The table (called NAME_RANGE) is basically

ZZ YY XX
A 10 40 70
B 20 50 80
C 30 60 90
TOTAL 60 150 240

The formula I am using is more or less:

=VLOOKUP("TOTAL",NAME_RANGE,MATCH("YY",NAME_RANGE) ,FALSE)

I should get 150.

What have I done wrong?

Cheers
TT



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 605
Default MATCH function in a VLOOKUP

TT,

Forgive me for borrowing the space of your thread. I want to ask Biff something. Forgive me for thinking aloud too. Bad habit.

Biff,

I had a feeling that MATCH ( ) in the formula was the culprit so I pulled it out and explored it.

I was able to achieve getting #N/A quite a few times. One case is not specifying "0" or "FALSE" which I suggested in my previous post.

Is it true that the argument for MATCH ( ) can either be a *single* column or a *single* row only? We can't use an array A1:D5 (Name_range), right? It gave me #N/A even when I tried to use CSE. ;) I suspected MATCH and Name_range together was the problem in the formula but I didn't know how to fix it although INDEX ( ) did pop up. Next time, I'll know.

Look forward to your guidance. I really like to know about the single column/row.

Epinn

"Biff" wrote in message ...
Is NAME_RANGE a dynamic range?

Try this:

=VLOOKUP("TOTAL",NAME_RANGE,MATCH("YY",INDEX(NAME_ RANGE,1,),0),FALSE)

Biff

"trevor_tito" wrote in message
...
Hi,

I am trying to determine the column index number in a vlookup with a
matcxh
function but I'm getting an #N/A error message.

The table I am looking up may change in shape (e.g. not always the same
number of rows or columns) so I have given this a name range.

The table (called NAME_RANGE) is basically

ZZ YY XX
A 10 40 70
B 20 50 80
C 30 60 90
TOTAL 60 150 240

The formula I am using is more or less:

=VLOOKUP("TOTAL",NAME_RANGE,MATCH("YY",NAME_RANGE) ,FALSE)

I should get 150.

What have I done wrong?

Cheers
TT




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,886
Default MATCH function in a VLOOKUP

Hi Trevor

I would be inclined to use Index Match for my result, rather than a mix
of Vlookup and Match
Regardless of the shape of your table, if the top left corner is always
A1 then
=INDEX(NAME_RANGE,MATCH("Total",A:A,0),MATCH("YY", (1:1),0))

If your NAME_RANGE does not always start in A1, then I would have 2
other named ranges,
Myrow which defined the row with the headings (e.g. $7:$7),
and Mycol which defined the column with the names and Total (e.g. $C:$C)
Then
=INDEX(NAME_RANGE,MATCH("Total",Mycol,0),MATCH("YY ",Myrow,0))

--
Regards

Roger Govier


"trevor_tito" wrote in message
...
Hi,

I am trying to determine the column index number in a vlookup with a
matcxh
function but I'm getting an #N/A error message.

The table I am looking up may change in shape (e.g. not always the
same
number of rows or columns) so I have given this a name range.

The table (called NAME_RANGE) is basically

ZZ YY XX
A 10 40 70
B 20 50 80
C 30 60 90
TOTAL 60 150 240

The formula I am using is more or less:

=VLOOKUP("TOTAL",NAME_RANGE,MATCH("YY",NAME_RANGE) ,FALSE)

I should get 150.

What have I done wrong?

Cheers
TT





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default MATCH function in a VLOOKUP

Hi Trevor,

Perhaps,

Name the cell TotalYY and reference that name thereafter?

HTH,
--
Kevin James.
Tua'r Goleuni


"trevor_tito" wrote in message
...
| Hi,
|
| I am trying to determine the column index number in a vlookup with a matcxh
| function but I'm getting an #N/A error message.
|
| The table I am looking up may change in shape (e.g. not always the same
| number of rows or columns) so I have given this a name range.
|
| The table (called NAME_RANGE) is basically
|
| ZZ YY XX
| A 10 40 70
| B 20 50 80
| C 30 60 90
| TOTAL 60 150 240
|
| The formula I am using is more or less:
|
| =VLOOKUP("TOTAL",NAME_RANGE,MATCH("YY",NAME_RANGE) ,FALSE)
|
| I should get 150.
|
| What have I done wrong?
|
| Cheers
| TT
|


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default MATCH function in a VLOOKUP

=INDEX(NAME_RANGE,MATCH("TOTAL",A1:A5,0),MATCH("YY ",A1:D1,0))


"trevor_tito" wrote:

Hi,

I am trying to determine the column index number in a vlookup with a matcxh
function but I'm getting an #N/A error message.

The table I am looking up may change in shape (e.g. not always the same
number of rows or columns) so I have given this a name range.

The table (called NAME_RANGE) is basically

ZZ YY XX
A 10 40 70
B 20 50 80
C 30 60 90
TOTAL 60 150 240

The formula I am using is more or less:

=VLOOKUP("TOTAL",NAME_RANGE,MATCH("YY",NAME_RANGE) ,FALSE)

I should get 150.

What have I done wrong?

Cheers
TT

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,886
Default MATCH function in a VLOOKUP

Hi Kevin

Tua'r Goleuni

Were you at Cardiff High School?

--
Regards

Roger Govier


"Ponty'NPop" wrote in message
...
Hi Trevor,

Perhaps,

Name the cell TotalYY and reference that name thereafter?

HTH,
--
Kevin James.
Tua'r Goleuni


"trevor_tito" wrote in message
...
| Hi,
|
| I am trying to determine the column index number in a vlookup with a
matcxh
| function but I'm getting an #N/A error message.
|
| The table I am looking up may change in shape (e.g. not always the
same
| number of rows or columns) so I have given this a name range.
|
| The table (called NAME_RANGE) is basically
|
| ZZ YY XX
| A 10 40 70
| B 20 50 80
| C 30 60 90
| TOTAL 60 150 240
|
| The formula I am using is more or less:
|
| =VLOOKUP("TOTAL",NAME_RANGE,MATCH("YY",NAME_RANGE) ,FALSE)
|
| I should get 150.
|
| What have I done wrong?
|
| Cheers
| TT
|




  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,688
Default MATCH function in a VLOOKUP

can either be a *single* column or a *single* row only?
We can't use an array A1:D5 (Name_range), right?


That is correct. Match only works on one dimensional arrays.

Biff

"Epinn" wrote in message
...
TT,

Forgive me for borrowing the space of your thread. I want to ask Biff
something. Forgive me for thinking aloud too. Bad habit.

Biff,

I had a feeling that MATCH ( ) in the formula was the culprit so I pulled it
out and explored it.

I was able to achieve getting #N/A quite a few times. One case is not
specifying "0" or "FALSE" which I suggested in my previous post.

Is it true that the argument for MATCH ( ) can either be a *single* column
or a *single* row only? We can't use an array A1:D5 (Name_range), right?
It gave me #N/A even when I tried to use CSE. ;) I suspected MATCH and
Name_range together was the problem in the formula but I didn't know how to
fix it although INDEX ( ) did pop up. Next time, I'll know.

Look forward to your guidance. I really like to know about the single
column/row.

Epinn

"Biff" wrote in message
...
Is NAME_RANGE a dynamic range?

Try this:

=VLOOKUP("TOTAL",NAME_RANGE,MATCH("YY",INDEX(NAME_ RANGE,1,),0),FALSE)

Biff

"trevor_tito" wrote in message
...
Hi,

I am trying to determine the column index number in a vlookup with a
matcxh
function but I'm getting an #N/A error message.

The table I am looking up may change in shape (e.g. not always the same
number of rows or columns) so I have given this a name range.

The table (called NAME_RANGE) is basically

ZZ YY XX
A 10 40 70
B 20 50 80
C 30 60 90
TOTAL 60 150 240

The formula I am using is more or less:

=VLOOKUP("TOTAL",NAME_RANGE,MATCH("YY",NAME_RANGE) ,FALSE)

I should get 150.

What have I done wrong?

Cheers
TT





  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default MATCH function in a VLOOKUP

Thanks Roger,

That worked a treat. I will need to name range the row and column headers.

Cheers.
TT

"Roger Govier" wrote:

Hi Trevor

I would be inclined to use Index Match for my result, rather than a mix
of Vlookup and Match
Regardless of the shape of your table, if the top left corner is always
A1 then
=INDEX(NAME_RANGE,MATCH("Total",A:A,0),MATCH("YY", (1:1),0))

If your NAME_RANGE does not always start in A1, then I would have 2
other named ranges,
Myrow which defined the row with the headings (e.g. $7:$7),
and Mycol which defined the column with the names and Total (e.g. $C:$C)
Then
=INDEX(NAME_RANGE,MATCH("Total",Mycol,0),MATCH("YY ",Myrow,0))

--
Regards

Roger Govier


"trevor_tito" wrote in message
...
Hi,

I am trying to determine the column index number in a vlookup with a
matcxh
function but I'm getting an #N/A error message.

The table I am looking up may change in shape (e.g. not always the
same
number of rows or columns) so I have given this a name range.

The table (called NAME_RANGE) is basically

ZZ YY XX
A 10 40 70
B 20 50 80
C 30 60 90
TOTAL 60 150 240

The formula I am using is more or less:

=VLOOKUP("TOTAL",NAME_RANGE,MATCH("YY",NAME_RANGE) ,FALSE)

I should get 150.

What have I done wrong?

Cheers
TT






  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 605
Default MATCH function in a VLOOKUP

Biff,

Thanks for answering my various questions. Appreciate it.

Epinn

"Biff" wrote in message ...
can either be a *single* column or a *single* row only?
We can't use an array A1:D5 (Name_range), right?


That is correct. Match only works on one dimensional arrays.

Biff

"Epinn" wrote in message
...
TT,

Forgive me for borrowing the space of your thread. I want to ask Biff
something. Forgive me for thinking aloud too. Bad habit.

Biff,

I had a feeling that MATCH ( ) in the formula was the culprit so I pulled it
out and explored it.

I was able to achieve getting #N/A quite a few times. One case is not
specifying "0" or "FALSE" which I suggested in my previous post.

Is it true that the argument for MATCH ( ) can either be a *single* column
or a *single* row only? We can't use an array A1:D5 (Name_range), right?
It gave me #N/A even when I tried to use CSE. ;) I suspected MATCH and
Name_range together was the problem in the formula but I didn't know how to
fix it although INDEX ( ) did pop up. Next time, I'll know.

Look forward to your guidance. I really like to know about the single
column/row.

Epinn

"Biff" wrote in message
...
Is NAME_RANGE a dynamic range?

Try this:

=VLOOKUP("TOTAL",NAME_RANGE,MATCH("YY",INDEX(NAME_ RANGE,1,),0),FALSE)

Biff

"trevor_tito" wrote in message
...
Hi,

I am trying to determine the column index number in a vlookup with a
matcxh
function but I'm getting an #N/A error message.

The table I am looking up may change in shape (e.g. not always the same
number of rows or columns) so I have given this a name range.

The table (called NAME_RANGE) is basically

ZZ YY XX
A 10 40 70
B 20 50 80
C 30 60 90
TOTAL 60 150 240

The formula I am using is more or less:

=VLOOKUP("TOTAL",NAME_RANGE,MATCH("YY",NAME_RANGE) ,FALSE)

I should get 150.

What have I done wrong?

Cheers
TT






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
Function Vlookup, Match or Index? Patrick Young Excel Worksheet Functions 7 October 4th 05 02:07 AM
MATCH function David Excel Discussion (Misc queries) 1 October 1st 05 03:28 AM
can vlookup be forced to make a case sensitive match? alan Excel Discussion (Misc queries) 1 September 22nd 05 12:59 PM
How do I access data stored in a SQL server for vlookup function? M.Heer Excel Worksheet Functions 8 May 12th 05 09:51 PM
Match Function arguments Stan Altshuller Excel Worksheet Functions 3 March 11th 05 08:48 PM


All times are GMT +1. The time now is 02:19 AM.

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

About Us

"It's about Microsoft Excel"