I have two sheets, column A in sheet 1 contains all the names

column A in sheet 2 contains some of the names (same names but may be some missing)

column B in sheet 2 contains some numbers

I need to paste the numbers in column B sheet 1 after comparing the names in column A in both sheets.thanks in advance

You can use the vlookup formula, like this.

=VLOOKUP(A1,Sheet2!A1:B30,2,0)

A1 means column A in sheet 1

Sheet2!A1:B30 means that A1:B30 is the area you wanna quote from.

2 means you wanna quote the column 2 from sheet 2 to sheet 1.

Hope I've made it clear.

If you don't want to get an #N/A error for the cells that don't have matching names on Sheet2, then wrap the formula in an "error checker". You also want to use Absolute References so you can drag the formula down and retain the same

lookup_array.I've split the formula into 2 lines to make it easier to read.

=IF(ISNA(VLOOKUP(A1,Sheet2!$A$1:$B$30,2,0)),"",

VLOOKUP(A1,Sheet2!$A$1:$B$30,2,0))This will return a blank cell, instead of #N/A, if the name isn't found on Sheet2.

Ask Your Question

Weekly Poll

Do you think Samsung's Bixby will compete well against other phone AI systems?

Discuss in The Lounge

Poll History