My First Sheet
Customer_Email
a1b1y1@gmail.com
usharao_h@rediffmail.com
bhimdipti@gmail.com
ramyan249@gmail.com
kannans1690@gmail.com
puharaman@gmail.com
rajiishiva90cs@yahoo.com
vibeeshanans@hotmail.com
basker.p@gmail.com
puharaman@gmail.com
gopalvenki@yahoo.com
gopalvenki@yahoo.com
On 2nd Sheet
ID Customer_Email
1058 18pe08@gmail.com
771 1991harishjayaraj@gmail.com
601 1995asrsanjay@gmail.com
619 2000.harikesh@gmail.com
459 678prabakaran@gmail.com
418 7411110424mm@gmail.com
590 98josh@gmail.com
557 a_rajendiran12@yahoo.co.in
226 a.p.praveen.30@gmail.com
702 a1b1y1@gmail.com
21 aartikolambkar@gmail.com
362 aaryahsingh77@gmail.com
1005 aaryan8587@gmail.com
167 aasshoka@gmail.com
966 abashwanth13@gmail.com
560 abbas15_99@yahoo.com
I need the corresponding ID from sheet2 to sheet1
The below one I used in sheet1's B2 Cell
=VLOOKUP(A2,Sheet2!A$2:B$1000,1,0)
Returns N/A and the error shows Did not find value 'a1b1y1@gmail.com' in VLOOKUP evaluation.
According to the VLOOKUP syntax - the search for values takes place in the first column of the range. In your formula VLOOKUP tries to find the value 'a1b1y1@gmail.com'
in the column Sheet2!A$2:A1000
and clearly can not find it there, because this text is in the range Sheet2!B$2:B1000
In Google Sheets you can use the following formula =ARRAYFORMULA(VLOOKUP(A2,{Sheet2!B:B,Sheet2!A:A},2,0))
- here we swap the ranges for finding the key and the range for output directly in the formula