Can Excel do 'lookups' and show different data depending upon the cell with the focus?

A

Austin Powers

I have Excel 2008 for the Mac and (to be honest) I'm only an occasional
user.

Is there a way to do the following:

I have the focus on cell A1. In cell D1 Excel will display the word
"Elephant"
I move the focus to cell A2 and Excel will display in cell D1 the word
"Giraffe".
I move the focus to cell A3 and Excel will display in cell d1 the word
"Zebra"

In other words, can Excel do some kind of lookup based on the cell the focus
is on?
 
G

Greg Glynn

You wouldn't do it with a lookup() function.

You'd do it with a

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
End Sub

Detect the current cell address, and update the value of D1
accordingly.
 
A

Austin Powers

Greg Glynn said:
You wouldn't do it with a lookup() function.

You'd do it with a

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
End Sub

Detect the current cell address, and update the value of D1
accordingly.


I'm something of a novice user and I am guessing that what you show above is
VBA and that VBA is not supported in Excel for Mac 2008.

Can you give me anymore information on this, but even having Goggled
"Worksheet_SelectionChange" I am still at a loss as to what it is or where I
would use it.
 
G

Greg Glynn

Yes, it's a VBA function. Sorry - Didn't realise the MAC version was
knobbled. I'm not sure how you'd do it otherwise.
 
A

Austin Powers

Greg Glynn said:
Yes, it's a VBA function. Sorry - Didn't realise the MAC version was
knobbled. I'm not sure how you'd do it otherwise.

The solution would be to upgrade to Office Mac 2011...
 

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