Hi,

I have a long list of names which I want to do autofilter on, as autofilter has maximum of only two criteria, I was going to create another column with numbers so I could sort them using that column.

Names ------------------ number returned by vlookup
Peter-----------------------------1
John------------------------------2
Dave-----------------------------1
Billy-------------------------------3
Clare------------------------------1
Richard ---------------------------3
Candice---------------------------1
Smith-----------------------------4
Colin------------------------------4
Ian--------------------------------4

What I need is a vlookup formula, that looks up column A and returns a number to column B, so if a cell has peter then it returns a number 1, also if cell has Dave & Candice it returns a value of one.

Can this be done? I have never used vlookup before so any help would be appreciated.

Thanks

Panic