Is Hlookup what I want?

G

Guest

And if so, how do I use it?

I have a worksheet with 2 sheets. It's used to track investment results for
a stock portfolio on a monthly basis. Sheet 2 has the results for different
stocks in the portfolio, by month like so:

Row 1 Jan 04 Feb 04 Mar 04 Apr 04
Row 2 345 445 245 130
Row 3 462 542 241 365
Row 4 123 99 101 241

On sheet 1, I would like to be able to type "Feb 04" in a cell in row 1, and
the values in the column under Apr 04 on sheet 2 would populate in the column
on sheet 1. I need to set up 2 columns on this on sheet 1 so I can compare
all the results of any two months I desire.

Not sure if Hlookup is the answer....I've played with it but don't know what
it's asking me for.

Thank you! Jtuck2
 
P

...Patrick

On sheet 1, I would like to be able to type "Feb 04" in a cell in row 1,
and
the values in the column under Apr 04 on sheet 2 would populate in the
column

is not : I would like to be able to type "feb 04" and ......"feb 04" ?

Patrick
 
D

Domenic

On Sheet 1, assuming that A1 contains the first month of interest, and
B1 contains the second month of interest...

A2, copied down and over to the next column:

=HLOOKUP(A$1,Sheet2!$A$1:$D$4,ROW(2:2),0)

Hope this helps!
 
G

Guest

Domenic,
Thanks so much for responding! (I was supposed to get an email that I had
received a response, but did not. I finally checked the site today).

Would you be able to be more specific for me? I don't know where to place
your code on Sheet 1. And then, can I physically type in "Feb 04" on sheet 1
to automatically copy the column of numbers appearing under Feb 04 on Sheet
2? I don't understand the basics of how to use this function. (am I asking it
to do too much?).

Also, row 1 on Sheet 2 contains the labels "Jan 04" "Feb 04", etc. So B2,
B3, B4 would be the monthly dollar amounts for different stocks in the
portfolio in January 04. Does that help to clarify? (Where I have Row 1
through Row 4 below--which would be column A, would actually be the names of
the different stocks in the portfolio).

The friend I'm trying to do this for had it all done correctly by someone
else (it worked), and then not understanding computers, he didn't save the
original and overwrote the code when using the worksheet.

Thanks for your patient help! Jan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top