Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 115
Default Can the Match function handle more than 7 variables?

I've been using the Match function to assign up to 7 values to variables in
an array but need a formula that will handle up to perhaps 20 or more
variables in this way.

Say, in cell B3 I wanted to lookup the values and assign a score of '1' for
value x (where x is a constant), '2' for value (x+3), '3' for variable (x+17) ... etc to '25' for value (x+39)


Could the Vlookup function be used to get these scores and if so what would
be the formula to?

Many thanks

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Can the Match function handle more than 7 variables?

That sound like a vlookup might work with a table something like this

Col A Col B
0 1
5 2
10 3
15 4
20 5

and a formula like
=VLOOKUP(C1,A1:B5,2,TRUE)

This looks for a match in Col A for the value in C1 and if it doesnt find
one it returns the next highest value. i.e. 0,1,2,3,4 all return 1

Note the tabke must be sorted

Mike
"Zakynthos" wrote:

I've been using the Match function to assign up to 7 values to variables in
an array but need a formula that will handle up to perhaps 20 or more
variables in this way.

Say, in cell B3 I wanted to lookup the values and assign a score of '1' for
value x (where x is a constant), '2' for value (x+3), '3' for variable (x+17) ... etc to '25' for value (x+39)


Could the Vlookup function be used to get these scores and if so what would
be the formula to?

Many thanks

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default Can the Match function handle more than 7 variables?

MATCH can handle many more than 7 possible values. Try it and see.


--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Zakynthos" wrote in message
...
I've been using the Match function to assign up to 7 values to variables
in
an array but need a formula that will handle up to perhaps 20 or more
variables in this way.

Say, in cell B3 I wanted to lookup the values and assign a score of '1'
for
value x (where x is a constant), '2' for value (x+3), '3' for variable
(x+17) ... etc to '25' for value (x+39)


Could the Vlookup function be used to get these scores and if so what
would
be the formula to?

Many thanks



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 115
Default Can the Match function handle more than 7 variables?

Mike,

Many thanks for your helpful suggestion.

It certainly works OK but my problem is that I need to assign values to a
SINGLE cell (without using a table - as it will not work easily with the rest
of the Visual Basic program I've written).

Is there not something similar to nested conditional statements (max 7 only
) or Match (also 7 only?) where, with text-based variables, I can assign,
say, in cell B1 a value to the items in A1 (input via separate macro) a '1'
to the first text item that might be input to A1, '2' to the second item that
might be input to A1 .....up to '25 (or more) for the last item?

"Mike H" wrote:

That sound like a vlookup might work with a table something like this

Col A Col B
0 1
5 2
10 3
15 4
20 5

and a formula like
=VLOOKUP(C1,A1:B5,2,TRUE)

This looks for a match in Col A for the value in C1 and if it doesnt find
one it returns the next highest value. i.e. 0,1,2,3,4 all return 1

Note the tabke must be sorted

Mike
"Zakynthos" wrote:

I've been using the Match function to assign up to 7 values to variables in
an array but need a formula that will handle up to perhaps 20 or more
variables in this way.

Say, in cell B3 I wanted to lookup the values and assign a score of '1' for
value x (where x is a constant), '2' for value (x+3), '3' for variable (x+17) ... etc to '25' for value (x+39)


Could the Vlookup function be used to get these scores and if so what would
be the formula to?

Many thanks

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
INDEX - MATCH with three variables Pops Jackson Excel Worksheet Functions 3 July 20th 07 06:09 PM
Please Help! vlookup & match with multiple variables ivygirl Excel Worksheet Functions 2 January 7th 06 09:46 AM
Index Match function for multiple linked variables Bob Excel Worksheet Functions 13 November 23rd 05 12:56 AM
Index Match function for multiple linked variables Bob Excel Worksheet Functions 0 November 22nd 05 02:12 AM
Index Match With 3 Variables Scooterdog Excel Worksheet Functions 5 January 2nd 05 07:05 PM


All times are GMT +1. The time now is 10:26 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"