Find a value in whole spreadsheet and return a true or false answer

ru_cheema

New Member
Joined
Aug 5, 2011
Messages
4
Hi,

I have 2 spreadsheets.

Spreadsheet 1 = Column A has a list of applications

Spreadsheet 2 = many different columns have applications

What im trying to do is find if spreadsheet 1 column A applications are in spreadsheet 2 in any of the columns. If yes, in spreadsheet 1 Column B I would like it to return a TRUE answer. If it cant be found, then it returns a FALSE answer.

I hope that makes sense.

Thank you in advance.

Ruby
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Hi,

I have 2 spreadsheets.

Spreadsheet 1 = Column A has a list of applications

Spreadsheet 2 = many different columns have applications

What im trying to do is find if spreadsheet 1 column A applications are in spreadsheet 2 in any of the columns. If yes, in spreadsheet 1 Column B I would like it to return a TRUE answer. If it cant be found, then it returns a FALSE answer.

I hope that makes sense.

Thank you in advance.

Ruby

Maybe:

Code:
Sub rucheema()
Dim lr As Long
Dim rng As Range
Dim x As Range

Columns("B:B").Insert shift:=xlToRight

lr = Cells(Rows.Count, 1).End(xlUp).Row

For Each rng In Range(Range("A2"), Range("A" & lr))

Set x = Sheets("Sheet2").Cells.Find(What:=rng.Value, LookIn:=xlValues, LookAt:=xlPart)

If Not x Is Nothing Then

    rng.Offset(0, 1).Value = "True"
    
Else

    rng.Offset(0, 1).Value = "False"
    
End If

Next rng
    

End Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,566
Messages
6,179,550
Members
452,927
Latest member
rows and columns

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