Returns columns that match the specified values

Rows.Lookup(1, 2, 3, 4)

1stringRequiredColumns to search for data
2stringRequiredValues uses in search
3numericnumber of rows to return
4stringOrder of rows to return

This sample code returns all rows in birthdayDE with a value of 25 for Age.

This sample code returns the same rows in birthdayDE, but it limits the results to two rows and sorts the results by last name.

When initializing data extensions with Lookup() in an email, you must use the name of the data extension. When using the function in landing pages, you can use either the name or the external key of the data extension. Make the name and the external key the same value when creating the data extension to ensure you use the correct value at all times.