Search in Excel

Vishaal

Well-known Member
Joined
Mar 16, 2019
Messages
533
Office Version
  1. 2010
  2. 2007
Platform
  1. Windows
  2. Web
Hi,

Thanks in advance.

May i search the following value/text

13452
3009
12744

in given sheet

Excel 2010 32 bit
A
B
1
2
10089​
3
3363​
4
13452​
5
3009​
6
12744​
7
12744​
8
56000​
9
56000​
10
66080​
11
56000​
12
10620​
13
17700​
14
10620​
15
17700​
16
10620​
17
5310​
18
7080​
19
7080​
20
5310​
21
10620​
22
3363​
23
13452​
24
13452​
25
3009​
26
12744​
27
56000​
28
56000​
29
66080​
30
56000​
31
10620​
32
17700​
33
10620​
34
17700​
35
10620​
36
5310​
37
7080​
38
7080​
39
5310​
40
10620​
Sheet: Sheet1

pls help
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Hi,

In col B you can try:

B2:
=--ISNUMBER(SEARCH(A2,"13452.3009.12744"))

OR if you put your list of numbers you want to search in to a named range "list" then:
=COUNTIF(list,A2)
 
Upvote 0
Hi tyija1995 Ji

its working

thanks​
 
Last edited:
Upvote 0
There is one problem in code

Its searching the any one amount which i have given

But i need the same

13452
3009
12744

Not any of them, Sequence also
 
Upvote 0
I mean i want the same sequences (whole amount )

13452
3009
12744
 
Last edited:
Upvote 0
try this array formula
Code:
=IF(ROWS($A$1:A1)>COUNT($C$1:$C$3),"",INDEX($A$1:$A$11,SMALL(IF(COUNTIF($C$1:$C$3,$A$1:$A$11),ROW($A$1:$A$11)-ROW($A$1)+1),ROWS($A$1:A1))))

Book1
ABCDEFG
1573313452sum
2673630091345229205
313452127443009
4651812744
512811
63009
710700
810646
912363
1012744
117076
Sheet1
Cell Formulas
RangeFormula
G2=SUM($E$2:$E$10)
E2{=IF(ROWS($A$1:A1)>COUNT($C$1:$C$3),"",INDEX($A$1:$A$11,SMALL(IF(COUNTIF($C$1:$C$3,$A$1:$A$11),ROW($A$1:$A$11)-ROW($A$1)+1),ROWS($A$1:A1))))}
E3{=IF(ROWS($A$1:A2)>COUNT($C$1:$C$3),"",INDEX($A$1:$A$11,SMALL(IF(COUNTIF($C$1:$C$3,$A$1:$A$11),ROW($A$1:$A$11)-ROW($A$1)+1),ROWS($A$1:A2))))}
E4{=IF(ROWS($A$1:A3)>COUNT($C$1:$C$3),"",INDEX($A$1:$A$11,SMALL(IF(COUNTIF($C$1:$C$3,$A$1:$A$11),ROW($A$1:$A$11)-ROW($A$1)+1),ROWS($A$1:A3))))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
No,

In your sheet you are searching the three number (anyone of them)

but i want this group, sequence

ok let try to understand by text not value

in this sheet

Excel 2010 32 bit
A
B
1
2
Rozi
3
John
4
Lakhn
5
Peter
6
Javed
7
Rozi
8
Salim
9
Javed
10
Rajan
11
Salim
12
Javed
13
Rozi
14
Salim
15
Javed
16
Sheet: Sheet1

I am searching
Excel 2010 32 bit
A
7
Rozi
8
Salim
9
Javed
Sheet: Sheet1

In above sheet i want to check when Rozi, Salim and Javed come together, answer is only two times they come together and i have highlighted that cells when they come together

Excel 2010 32 bit
A
B
C
D
1
2
Rozi
3
John
4
Lakhn
5
Peter
6
Javed
7
Rozi
After Five Days​
One Time​
8
Salim
9
Javed
10
Rajan
11
Salim
12
Javed
13
Rozi
After Four Days​
Second Time​
14
Salim
15
Javed
16
Sheet: Sheet1
 
Upvote 0
How about

B2:
=IF(SUMPRODUCT(--({"Rozi";"Salim";"Javed"}=A2:A4))=3,"FLAG","")

Then drag it down

AB
1
2Rozi
3John
4Lakhn
5Peter
6Javed
7RoziFLAG
8Salim
9Javed
10Rajan
11Salim
12Javed
13RoziFLAG
14Salim
15Javed

<tbody>
</tbody>
 
Last edited:
Upvote 0
Thanks tyija1995 Ji,

Its working fine for me

Only one thing missing, After how many days/rows



 
Last edited:
Upvote 0
How About This formula
Code:
=IF(OR(COLUMNS($A$1:A1)>COUNTIF($A$2:$A$13,$D2),$D2=""),"",INDEX($B$2:$B$13,SMALL(IF(COUNTIF($D2,$A$2:$A$13),ROW($B$2:$B$13)-ROW($B$2)+1),COLUMNS($A$1:A1))))

Book1
ABCDEFG
2A1 :Time AA1 :Time A2 :Time A 
3B1 :Time BB1 :Time B2 :Time B
4C1 :Time CE1 :Time E2 :Time E3 :Time E
5D1 :Time D
6E1 :Time E
7A2 :Time A
8B2 :Time B
9E2 :Time E
10D2 :Time D
11M1 :Time M
12E3 :Time E
13O1 :Time O
Sheet1
Cell Formulas
RangeFormula
B2=COUNTIF($A$2:A2,A2)&" :Time "&A2
E2{=IF(OR(COLUMNS($A$1:A1)>COUNTIF($A$2:$A$13,$D2),$D2=""),"",INDEX($B$2:$B$13,SMALL(IF(COUNTIF($D2,$A$2:$A$13),ROW($B$2:$B$13)-ROW($B$2)+1),COLUMNS($A$1:A1))))}
F2{=IF(OR(COLUMNS($A$1:B1)>COUNTIF($A$2:$A$13,$D2),$D2=""),"",INDEX($B$2:$B$13,SMALL(IF(COUNTIF($D2,$A$2:$A$13),ROW($B$2:$B$13)-ROW($B$2)+1),COLUMNS($A$1:B1))))}
G2{=IF(OR(COLUMNS($A$1:C1)>COUNTIF($A$2:$A$13,$D2),$D2=""),"",INDEX($B$2:$B$13,SMALL(IF(COUNTIF($D2,$A$2:$A$13),ROW($B$2:$B$13)-ROW($B$2)+1),COLUMNS($A$1:C1))))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,652
Messages
6,120,746
Members
448,989
Latest member
mariah3

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