PDA

View Full Version : [SOLVED:] Using Lookup command I think



Tenspeed39355
06-10-2005, 05:15 AM
Good morning guys. I have two columns of stock symbols. There are around
400 symbols. One column is from one month ago and the second column is current. I have numbered the first column 1-400 and the second column 1-400.
What I want to do is to be able to match up the symbols in the second column with the symbols in the first column by a number. Example AOF is #1 in column
#1 and it is # 200 in column #2. I would like for the result to say AOF is in the
#1 position. This way I can see how much change there as been in the past month.
Thanks for your help.
Max: pray2:

MWE
06-10-2005, 07:46 AM
Good morning guys. I have two columns of stock symbols. There are around 400 symbols. One column is from one month ago and the second column is current. I have numbered the first column 1-400 and the second column 1-400.
What I want to do is to be able to match up the symbols in the second column with the symbols in the first column by a number. Example AOF is #1 in column #1 and it is # 200 in column #2. I would like for the result to say AOF is in the #1 position. This way I can see how much change there as been in the past month.
Thanks for your help.
Max: pray2:
Max: are you looking for an interactive method, e.g., you select a symbol in one column and "something" tells you that number for that same symbol in the other column? Or are you looking for method that will, say, create a 3rd column with the "result" in that 3rd column?

The 2nd approach can be solved using Excel's builtin functionality (one of the lookup functions would work), or a simple macro. A macro would be a simplier solution to the 1st approach.

I have attached an example of how the interactive method might be done with a macro. Just select one of the symbols and click on the command button. The code has builtin tests for most problems and is pretty easy to understand.

chitosunday
06-10-2005, 07:50 AM
Try the match function with the option false or zero to seek the exact match and give you the position

Tenspeed39355
06-10-2005, 12:07 PM
Your question was "are you looking for an interactive method, e.g., you select a symbol in one column and "something" tells you that number for that same symbol in the other column? Or are you looking for method that will, say, create a 3rd column with the "result" in that 3rd column?

My answer is yes. I want to be able to see in the third column that AOF that is in the first position in column 2 is in 200 in column one. If you are going to use the match fuction please send an example. Again thanks

Max

MWE
06-10-2005, 12:44 PM
Your question was "are you looking for an interactive method, e.g., you select a symbol in one column and "something" tells you that number for that same symbol in the other column? Or are you looking for method that will, say, create a 3rd column with the "result" in that 3rd column?

My answer is yes. I want to be able to see in the third column that AOF that is in the first position in column 2 is in 200 in column one. If you are going to use the match fuction please send an example. Again thanks

Max
I modified the original example to add the 3rd col feature.

Tenspeed39355
06-10-2005, 01:40 PM
Thanks for your time with my problem. It has been solved
Max