jskfan
asked on
VB script to search through Excel
I have an excel workbook that has 2 worksheets, WRK1 and WRK2 , on one worksheet WRK2 I have one column that has names and I would like to search those names if they Exist in WRK1 and if they are found they will be written on the WRK2 next column beside the existing name , if not found then the word "Not Found" will be written next to searched name in the next column.
This script will help me avoid using CTRL +F and search through thousands of names one at a time if they exist in both worksheets,
Thanks
This script will help me avoid using CTRL +F and search through thousands of names one at a time if they exist in both worksheets,
Thanks
ASKER
it looks good.
Could you please just paste here the script that can do the task I am looking for ?
Could you please just paste here the script that can do the task I am looking for ?
jskfan: Could you please upload a sample of your workbooks. Maybe we might even be able to do it using Countif() or Vlookup() formulas.
Sid
Sid
ASKER
I have it at work..
here is the example.
I have one Workbook for instance WRKBK1 that has 2 Worksheets WRK1 and WRK2
WRK1 has a column for instance named NAME,
Name
ABCD
XYZF
TRYP
MITH
etc..
WRK2 has also a column named Name:
BCDG
FRHG
TRYP
MITH
now the script will read from WRK2 names, since BCDG is not in WRK1 it will put in WRK2 in the column nest to the colum NAME, the word " Not Found"
Since TRYP and MITH are found in WRK1, it will write in WRK2 in the column next to the column Name, the word " Found"
here is the example.
I have one Workbook for instance WRKBK1 that has 2 Worksheets WRK1 and WRK2
WRK1 has a column for instance named NAME,
Name
ABCD
XYZF
TRYP
MITH
etc..
WRK2 has also a column named Name:
BCDG
FRHG
TRYP
MITH
now the script will read from WRK2 names, since BCDG is not in WRK1 it will put in WRK2 in the column nest to the colum NAME, the word " Not Found"
Since TRYP and MITH are found in WRK1, it will write in WRK2 in the column next to the column Name, the word " Found"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>>>Cell B2 of WRK2
Sorry, I mean cell B1 of Wrk2.
Sid
Sorry, I mean cell B1 of Wrk2.
Sid
ASKER
I will try it later thanks
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Excellent
http://www.vbforums.com/showthread.php?p=3922547
Hope it helps.
Sid