Search code examples
excelvbacelllookuppaste

VBA Excel : Lookup mutiple values & return matched value to the next cell


This question is corresponding to this link VBA Excel : Extract data in specific format from CSV files

but i have a different problem here.

In CVS file, In the col C full of information about application softwares like Windows XP, Adobe, Office, .net Framework, vlc, etc.... So, in the col C i have around >1800 lines.

I want to look for Windows XP,Adobe, IBM, VLC etc in each & every col cell or in the entire col if there a match then paste the match value in the next column cell.

For example, if "Adobe" found then paste "Adobe" to the next col cell.

How can i perform using ìf or Lookup or is there any best way??

if(FIND("Adobe",C:C),"TRUE","FALSE")

=Lookup(Windows XP, C:C) would return "Windows XP" =Lookup(Adobe, C:C) would return "Adobe" =Lookup(IBM, C:C) would return "IBM "

I have uploaded the CVS file here!!

http://uploadmb.com/freeuploadservice.php?uploadmbID=1324042163&srv=www&filename=5200.csv


Solution

  • You could use a formula in column D to check for "Windows XP" or whatever data you're trying to find:

    =IF(ISERROR(FIND("Windows XP",C2)),"","Windows XP")
    

    Jesse