Check to see if string is anywhere in a column

newbieVBAwriter

New Member
Joined
Jun 11, 2013
Messages
2
Hey there ladies and gents,

I would like to write a VBA code that would take the all the cells in a column, column B, and see if all of these different cells are anywhere as a string in column K. The only problem I continue to run into is the fact that there are more or some missing characters in column K than in column B (ex. B2= RSI=24MASI and some cell in K= 1K24MASI) or something along the lines of that. The amount of rows can vary also.

I also looked into writing a formula like this
Code:
[COLOR=#000000][FONT=Consolas]=[/FONT][/COLOR][COLOR=#00008B][FONT=Consolas]IF[/FONT][/COLOR][COLOR=#000000][FONT=Consolas]([/FONT][/COLOR][COLOR=#000000][FONT=Consolas]ISNA[/FONT][/COLOR][COLOR=#000000][FONT=Consolas]([/FONT][/COLOR][COLOR=#000000][FONT=Consolas]VLOOKUP[/FONT][/COLOR][COLOR=#000000][FONT=Consolas](<[/FONT][/COLOR][COLOR=#00008B][FONT=Consolas]single[/FONT][/COLOR][COLOR=#000000][FONT=Consolas] column A value[/FONT][/COLOR][COLOR=#000000][FONT=Consolas]>,<[/FONT][/COLOR][COLOR=#000000][FONT=Consolas]entire column K range[/FONT][/COLOR][COLOR=#000000][FONT=Consolas]>,[/FONT][/COLOR][COLOR=#800000][FONT=Consolas]1[/FONT][/COLOR][COLOR=#000000][FONT=Consolas],[/FONT][/COLOR][COLOR=#800000][FONT=Consolas]FALSE[/FONT][/COLOR][COLOR=#000000][FONT=Consolas])),[/FONT][/COLOR][COLOR=#800000][FONT=Consolas]FALSE[/FONT][/COLOR][COLOR=#000000][FONT=Consolas],[/FONT][/COLOR][COLOR=#000000][FONT=Consolas] [/FONT][/COLOR][COLOR=#800000][FONT=Consolas]TRUE[/FONT][/COLOR][COLOR=#000000][FONT=Consolas])[/FONT][/COLOR]
but that returned some interesting N/A's or #NAME errors.

I could really use some guidance/help in writing this.

Also, I am writing this on excel 2003 so some of the newer functions don't apply.

Thank you so much.
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

Forum statistics

Threads
1,216,095
Messages
6,128,795
Members
449,468
Latest member
AGreen17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top