formula to search a column of cells and retrieve item

bhn319

New Member
Joined
Aug 3, 2011
Messages
3
How can I have excel search a column in which each cell contains multiple numbers (ex column f) for a number that is in a particular cell (ex A61)?
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
How can I have excel search a column in which each cell contains multiple numbers (ex column f) for a number that is in a particular cell (ex A61)?
Can you post some sample data?

Also, what do want to do once you find this number?
 
Upvote 0
With oversimplified Sheet1, like so..
Excel Workbook
ABCDEF
1Look For Multiple ofMyNums
23310
320
433
540
645
755
866
977
1099
Sheet1
Excel 2007

Paste this code into a Standard module and run it:

Code:
Sub Foo()
LR = Range("F" & Rows.Count).End(xlUp).Row
Set Rng = Range("F2:F" & LR)
For Each c In Rng
    r = c.Value Mod Range("$A$2")
    If r = 0 Then
        temp = temp & "," & c.Address
    End If
Next c
MsgBox Right(temp, Len(temp) - 1)
End Sub

Does this work for you?
 
Upvote 0

Forum statistics

Threads
1,224,517
Messages
6,179,233
Members
452,898
Latest member
Capolavoro009

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