Hi Deepak rawat ! I saw the solution you have provided is working perfectly and also implementing immediately that's a very good job doing by a VBA function "OFFSET" I will highly appreciate.
On May 22, 1:20 pm, kishan....@gmail.com wrote: > Hi, > I did this with vba, but I am unable to attache excle file. so I > paste this code to here... > -------------------------------------------------------------- > Private Sub Worksheet_Change(ByVal Target As Range) > On Error GoTo Err1: > Static l As Integer > Static i As Integer > If Target.Value = "" Then > GoTo my > End If > > If l > 0 Then > GoTo jay > End If > > l = Application.WorksheetFunction.Match(Target.Value, Sheet2.Range > ("A1:A10"), 0) > jay: > i = i + 1 > Target.Offset(0, 1).Value = Sheet2.Cells(l, i + 1) > my: > l = 0 > i = 0 > Err1: > > End Sub > --------------------------------------------------------------------------- > --------------------- > ....only you have to paste this code on vba editor > Alt+F11 > double click on sheet1 and paste it there it will run. > > Regards, > Jai Kishan > > On May 20, 10:10 am, Deepak Rawat <deepakrawa...@gmail.com> wrote: > > > Hi all!i have attached a file, there is 5 fields in the file > > my requirement is, as i put city name in city field, then all the field > > should fill accordingly > > like as i put Mumbai, the names n Ph nos come accordingly ie. AMD_NAME=>ANIK > > BHASIN AND ADM_PH => 9921356982 and the same for GM name as well. > > > regards, > > Deepak rawat > > > Book1.xls > > 44KViewDownload --~--~---------~--~----~------------~-------~--~----~ ------------------------------------------------------------------------------------- Some important links for excel users: 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at http://www.excelitems.com 2. Excel tutorials at http://www.excel-macros.blogspot.com 3. Learn VBA Macros at http://www.vbamacros.blogspot.com 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com If you find any spam message in the group, please send an email to: Ayush Jain @ jainayus...@gmail.com or Ashish Jain @ 26may.1...@gmail.com ------------------------------------------------------------------------------------- -~----------~----~----~----~------~----~------~--~---