Formula for entering data from one sheet to another

I need to write an excel forumla where the data from one sheet is entered into a cell on anther sheet.

Sheet 1

column A column B
name 1 date 1
name 1 date 2
name 1 date 3
name 2 date 2

Sheet 2

column A date 1 date 2 date 3
name 1
name 2
name 3

(IF sheet 1 colum A = sheet 2 A2 and sheet 1 colum b = sheet 2 B2, then 1)

Does this make sense? How would I write the formula?

your best bet is to use a

your best bet is to use a pivot table