How to create a macro that compares a list to another list

R

Rampa

How can i make this macro check for eksample one collum to another collum.
This is a phone bill that is going to be checked agains a phone book, if some
of the numbers is equal to one of the numbers in the phonebook, it is going
to autofill the name for this nr in the phone bill.
 
D

David Jessop

Hi,

You don't need to use a macro. You can either use =VLOOKUP or, if you are
getting more than one bit of data from the phonebook, =MATCH and =INDEX.

Suppose the column you have the numbers in the bill in is A and the phone
book is in a range E1:G11, with the phone numbers in the first column, name
in the second and (say) address in the third. Then

=VLOOKUP(A1,$E$1:$G$11,2,FALSE)

would give you the name (if the phone number exists).

Regards,

David Jessop
 

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