Dear Ashish, Please try below code...
Function check_value(rng As Range) As String Dim cell, rng1 As Range Set rng1 = Sheet2.Range("D4:D10") For Each cell In rng1 If cell.Value = rng.Value Then MsgBox "Bill is made of this Chassis", vbInformation End If Exit Function Next cell End Function see attached sheet.. On Thu, Jan 19, 2012 at 12:23 PM, Ashish Bhalara <ashishbhalar...@gmail.com>wrote: > Dear experts, > > I have lower level knowledge in excel vba, so please check below coding > which not working. I need the Msgbox when entered value match from another > sheet. The example sheet attached herewith. Please also know the basic > rules of how to use excel function in Visual Basic. > > Kindly solve my query that I use macro in .xlsx format, so what is the > difference to use macro in macro-enable workbook format and simple .xlsx > format? > > Thanks & Regards > > Ashish Bhalara > 9624111822 > > -- > FORUM RULES (986+ members already BANNED for violation) > > 1) Use concise, accurate thread titles. Poor thread titles, like Please > Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice > will not get quick attention or may not be answered. > > 2) Don't post a question in the thread of another member. > > 3) Don't post questions regarding breaking or bypassing any security > measure. > > 4) Acknowledge the responses you receive, good or bad. > > 5) Cross-promotion of, or links to, forums competitive to this forum in > signatures are prohibited. > > NOTE : Don't ever post personal or confidential data in a workbook. Forum > owners and members are not responsible for any loss. > > > ------------------------------------------------------------------------------------------------------ > To post to this group, send email to excel-macros@googlegroups.com > -- Thanks & regards, Noorain Ansari *http://excelmacroworld.blogspot.com/*<http://excelmacroworld.blogspot.com/> *http://noorain-ansari.blogspot.com/* <http://noorain-ansari.blogspot.com/> -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ------------------------------------------------------------------------------------------------------ To post to this group, send email to excel-macros@googlegroups.com
Copy of Demo(Solved).xlsm
Description: application/vnd.ms-excel.sheet.macroenabled.12