Two Plus Two Older Archives  

Go Back   Two Plus Two Older Archives > 2+2 Communities > Other Other Topics
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 08-18-2005, 04:41 PM
davelin davelin is offline
Senior Member
 
Join Date: Aug 2004
Posts: 708
Default Re: Tough Excel Question

[ QUOTE ]
[ QUOTE ]
[ QUOTE ]
You could create a fourth column that is the combination of the first two and do a VLOOKUP on that column. Am I misunderstanding your question?

[/ QUOTE ]

And you have to sort the data by that column, I believe.

[/ QUOTE ]
For a real vlookup, this is true. Which is why it is often preferable to use Index(DataColumn, Match(LookupValue, KeyColumn,0),false) instead of a true vlookup. The Index and Match functions are also more flexible than vlookups.

[/ QUOTE ]

Interesting, although I know excel says it needs to be sorted as a default, I've never run into a problem using vlookup's on unsorted tables.
Reply With Quote
  #12  
Old 08-18-2005, 04:42 PM
LondonBroil LondonBroil is offline
Senior Member
 
Join Date: Jan 2003
Posts: 576
Default Re: Tough Excel Question

[ QUOTE ]
You could create a fourth column that is the combination of the first two and do a VLOOKUP on that column. Am I misunderstanding your question?

[/ QUOTE ]

My sister is having this problem. The first column is actually tubing outside diamter (e.g. 0.25 inches) and the 2nd column isn't letters, it's tubing guage (e.g. "20" guage). I was not aware of this before since she just sent me a "basic" version of the table that had letters instead of numbers in column 2. So if we made a 4th column and combined them, it would look like 0.2520 which doesn't make sense.

She wants the values in column A and B to be user inputed and have it spit out the corresponding C column value.

And to the other person who mentioned having the 2nd column as a row. She mentioned she COULD do it that way, but she wants to keep it set up the way it is.
Reply With Quote
  #13  
Old 08-18-2005, 04:49 PM
davelin davelin is offline
Senior Member
 
Join Date: Aug 2004
Posts: 708
Default Re: Tough Excel Question

Could you still create your 4th column, create a cell which is the combination of two user-inputed numbers, and the do a lookup on that cell?
Reply With Quote
  #14  
Old 08-18-2005, 04:51 PM
maryfield48 maryfield48 is offline
Senior Member
 
Join Date: May 2004
Location: Kingston, Jamaica
Posts: 144
Default Re: Tough Excel Question

[ QUOTE ]
[ QUOTE ]
You could create a fourth column that is the combination of the first two and do a VLOOKUP on that column. Am I misunderstanding your question?

[/ QUOTE ]

My sister is having this problem. The first column is actualy tubing outside diamter (e.g. 0.25 inches) and the 2nd column isn't letters, it's tubing guage (e.g. "20" guage). So if we made a 4th column and combined them, it would look like 0.2520 which doesn't make sense.

She wants the values in column A and B to be user inputed and have it spit out the corresponding C column value.

This is a real pain.

[/ QUOTE ]

It doesn't have to make sense, it will still work. Let's say you add a column that concatenates the contents of cell A2 [i.e. .25] and the contents of cell B2 [i.e. 20] as ".25/20" [The formula would read =concatenate(a2&"/"&b2)]

You could have the user input the value they need [.25/20] into another cell, say G2, and in G3 you have the formula =vlookup(G2,table_array,4,FALSE) to return the required value. The user would just have to know the correct syntax, i.e. outside diameter/guage.
Reply With Quote
  #15  
Old 08-18-2005, 04:51 PM
TheWorstPlayer TheWorstPlayer is offline
Senior Member
 
Join Date: Dec 2004
Location: Boring work = post too much
Posts: 2,435
Default Re: Tough Excel Question

Same as before. Just to make sure that 2&232 looks different from 22&32, add an underscore or something so your formula will look like =a1&"_"&b1 for your index column.
Reply With Quote
  #16  
Old 08-18-2005, 04:54 PM
TheWorstPlayer TheWorstPlayer is offline
Senior Member
 
Join Date: Dec 2004
Location: Boring work = post too much
Posts: 2,435
Default Re: Tough Excel Question

[ QUOTE ]
[ QUOTE ]
[ QUOTE ]
[ QUOTE ]
You could create a fourth column that is the combination of the first two and do a VLOOKUP on that column. Am I misunderstanding your question?

[/ QUOTE ]

And you have to sort the data by that column, I believe.

[/ QUOTE ]
For a real vlookup, this is true. Which is why it is often preferable to use Index(DataColumn, Match(LookupValue, KeyColumn,0),false) instead of a true vlookup. The Index and Match functions are also more flexible than vlookups.

[/ QUOTE ]

Interesting, although I know excel says it needs to be sorted as a default, I've never run into a problem using vlookup's on unsorted tables.

[/ QUOTE ]
I'm pretty sure that I have and can try to construct an example if you want. But I mainly use Index and Match when I want to do funkier stuff that vlookups won't easily accomodate.
Reply With Quote
  #17  
Old 08-18-2005, 04:54 PM
Patrick del Poker Grande Patrick del Poker Grande is offline
Junior Member
 
Join Date: Apr 2004
Posts: 8
Default Re: Tough Excel Question

Man... just use Matlab instead.
Reply With Quote
  #18  
Old 08-18-2005, 04:55 PM
maryfield48 maryfield48 is offline
Senior Member
 
Join Date: May 2004
Location: Kingston, Jamaica
Posts: 144
Default Re: Tough Excel Question

[ QUOTE ]
And you have to sort the data by that column, I believe.

[/ QUOTE ]

For a real vlookup, this is true. Which is why it is often preferable to use Index(DataColumn, Match(LookupValue, KeyColumn,0),false) instead of a true vlookup. The Index and Match functions are also more flexible than vlookups.

[/ QUOTE ]

I'm so glad I came into this thread. I've learnt something that will be very useful.
Reply With Quote
  #19  
Old 08-18-2005, 04:58 PM
TheWorstPlayer TheWorstPlayer is offline
Senior Member
 
Join Date: Dec 2004
Location: Boring work = post too much
Posts: 2,435
Default Re: Tough Excel Question

[ QUOTE ]
[ QUOTE ]
And you have to sort the data by that column, I believe.

[/ QUOTE ]

For a real vlookup, this is true. Which is why it is often preferable to use Index(DataColumn, Match(LookupValue, KeyColumn,0),false) instead of a true vlookup. The Index and Match functions are also more flexible than vlookups.

[/ QUOTE ]

I'm so glad I came into this thread. I've learnt something that will be very useful.

[/ QUOTE ]
At work, I get paid for giving Excel training. [img]/images/graemlins/tongue.gif[/img]
Reply With Quote
  #20  
Old 08-18-2005, 05:02 PM
sfer sfer is offline
Senior Member
 
Join Date: Jan 2004
Location: New York
Posts: 806
Default Re: Tough Excel Question

[ QUOTE ]
Suppose you have a spreadsheet where down the 1st column you have something like 1,1,1,1,2,2,2,2,3,3,3,3,etc. Down the 2nd column you have A,B,C,D,A,B,C,D,A,B,C,D,etc. Down the 3rd columnm you have 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, etc.

Is there a way to use the VLOOKUP function to input 2 variables, 1 from column 1 and 1 from column 2, to return the corresponding number in the 3rd column?

The problem is that I can only figure out how to input 1 variable. So if I do a =VLOOKUP(2,A2:Cx,3,FALSE), then it only returns a 0.5 because that's the number in the 3rd column that corresponds to the first number 2 in the 1st column.

If I wanted to return a 0.7, I'd need to input a 2 from the 1st column, AND a C from the 2nd column.

Any ideas?

[/ QUOTE ]

Concatenate the columns into a long string and vlookup that.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:49 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.