Search Array for Exact value and return specific columns from searched array and ONLY rows that match actual search value

Kerryx

Well-known Member
Joined
May 6, 2016
Messages
740
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
As you can see having major brain issue this morning, want to search array for "P1" but getting all rows starting with "P1" returning, how can i get only rows containing "P1" to return, not the "P12" or "P13" and so on.

Book1
ABCDEFGHIJK
1SKUTESTMethodMinMaxP1
2P1pHMeter4.56.5P1pH4.56.5
3P1ColourClr12.2P1Colour12.2
4P1FlavourFlv5.56.5P1Flavour5.56.5
5P1SaltNaCl1.52.5P1Salt1.52.5
6P1FatGerb45.550.5P1Fat45.550.5
7P2pHMeter5.16.1P12Fat4565
8P2ColourClr6.5P12pH6.57
9P2FlavourFlv6P12Colour6.27.2
10P2SaltNaCl12.5P12Flavour06.2
11P12FatGerb4565P12Salt1.22.3
12P12pHMeter6.57
13P12ColourClr6.27.2
14P12FlavourFlv6.2
15P12SaltNaCl1.22.3
16P21FatGerb2535
17P21pHMeter6.57.4
18P21ColourClr4.56.7
19P21FlavourFlv7
20P21SaltNaCl2.53.5
21P22FatGerb22.533.5
Sheet1
Cell Formulas
RangeFormula
H2:K11H2=CHOOSECOLS(FILTER($A$2:$E$21,ISNUMBER(SEARCH($G$1,$A$2:$A$21))),{1,2,4,5})
Dynamic array formulas.
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
How about
Excel Formula:
=CHOOSECOLS(FILTER($A$2:$E$21,$A$2:$A$21=G1),{1,2,4,5})
 
Upvote 0
Solution
You're a star Fluff, me head was wrecked over this ...... 😵‍💫
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,217
Members
452,619
Latest member
Shiv1198

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