Compare Cell

P

Peter

Hi, I am trying to compare a cell that contains text located at "m87" with a
list of place names, ie Brisbane, Sydney, Melbourne.

Each city has numbers to go with it, so if the cell contains say Brisbane,
then it would input 30 into cell "n88". The same for the rest with diffrent
numbers of course.

I searched the forums for something similar, but no luck.

Any help appreciated.
Peter
 
T

Tom Ogilvy

$n n88
=if(m87="","",vlookup(m87,Sheet2!$A$1:$B$3,2,0))

assume on sheet2 in A1:B3:
Brisbane 30
Sydney 40
Melbourne 50
 
P

Peter

Thanks to you both.
My mindset is still that everything has to be done in VBA, good to see it
can be done just as well in a formula =)
Now I have a new set of things to learn...this Vlookup thing looks
interesting.

Peter
 

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