![]() |
Help-IF Function
Hi Everybody ! I have 2 worksheets in an excel file which are constructed in the following way : Worksheet1 has 2 columns , A& B Worksheet2 has 2 columns , C& D A new column E needs to be created in Worksheet2 in such a way that the value of a cell (e.g E2)is determined in the following way : Search column B in Worksheet1 for the value D2 in Worksheet2 and where the value is found (for e.g B7) , then E2=A7. If there is no value , return "No Names Found" . Can this be done within a formula . All help will be greatly appreciated ! Thanks. -Girish Punjabi -- Girish Punjabi ------------------------------------------------------------------------ Girish Punjabi's Profile: http://www.excelforum.com/member.php...o&userid=16048 View this thread: http://www.excelforum.com/showthread...hreadid=275087 |
=IF(ISNUMBER(MATCH(D2,Sheet1!B:B,0)),INDEX(Sheet1! A:A,MATCH(D2,Sheet1!B:B,0)
),"No Names Found") -- HTH RP (remove nothere from the email address if mailing direct) "Girish Punjabi" wrote in message ... Hi Everybody ! I have 2 worksheets in an excel file which are constructed in the following way : Worksheet1 has 2 columns , A& B Worksheet2 has 2 columns , C& D A new column E needs to be created in Worksheet2 in such a way that the value of a cell (e.g E2)is determined in the following way : Search column B in Worksheet1 for the value D2 in Worksheet2 and where the value is found (for e.g B7) , then E2=A7. If there is no value , return "No Names Found" . Can this be done within a formula . All help will be greatly appreciated ! Thanks. -Girish Punjabi -- Girish Punjabi ------------------------------------------------------------------------ Girish Punjabi's Profile: http://www.excelforum.com/member.php...o&userid=16048 View this thread: http://www.excelforum.com/showthread...hreadid=275087 |
=IF(ISNA(MATCH(D2,Sheet1!$B$2:$B$100,0)),"No Names Found",INDEX(Sheet1!$A$2:$A$100,MATCH(Sheet2!D2,Sh eet1!$B$2:$B$100,0))) Adjust the range accordingly. Hope this helps! -- Domenic ------------------------------------------------------------------------ Domenic's Profile: http://www.excelforum.com/member.php...o&userid=10785 View this thread: http://www.excelforum.com/showthread...hreadid=275087 |
All times are GMT +1. The time now is 10:11 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com