Extract information from a cell

shoneh

Board Regular
Joined
Jul 18, 2013
Messages
50
Hello all,

I have a spread sheet, see below.

Name</SPAN></SPAN>
Sales</SPAN></SPAN>
Total sales</SPAN></SPAN>
DAVE|BARRY</SPAN></SPAN>
24</SPAN></SPAN>
1</SPAN></SPAN>
BARRY|JOHN</SPAN></SPAN>
47</SPAN></SPAN>
2</SPAN></SPAN>
DAVE|JOHN</SPAN></SPAN>
205</SPAN></SPAN>
5</SPAN></SPAN>

<TBODY>
</TBODY>


What I’m looking for is a formula/ vba code that will scan through the name column and extract all the details in which for example Barry has been a participant. And the appropriate details in column b/c. </SPAN>

I was thinking and index and match, but I can’t get it to grab the specific details as it just sees it all as one word. Ideally a VBA code would be better as it runs over various row lengths.

Thanks in advance... </SPAN>
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Or Advanced Filter with wildcards in the Criteria:


Excel 2003
ABCDEFG
1NameSalesTotal salesCriteria->Name
2DAVE|BARRY241*BARRY*
3BARRY|JOHN472Output->NameSalesTotal sales
4DAVE|JOHN2055DAVE|BARRY241
5BARRY|JOHN472
Sheet1
 
Upvote 0
Hi shoneh and welcome to MrExcel.

* This is a formula solution.

Based on your sample data are these the results you would expect for Barry?..

Excel Workbook
ABCDEFGH
1NameSalesTotal salesNameSalesTotal sales
2DAVE|BARRY241Barry241
3BARRY|JOHN472472
4DAVE|JOHN2055
5
Sheet3


The formula in F2 needs to be entered using ctrl shift enter and NOT just enter, it can then be copied across and down. You will obviously have to change the cell references to suit your layout.

I hope that helps.

Ak
 
Upvote 0
I seem to get a #NAME? error even with the array function ctrl shift enter... :(

Hi shoneh and welcome to MrExcel.

* This is a formula solution.

Based on your sample data are these the results you would expect for Barry?..

Sheet3

ABCDEFGH
1NameSalesTotal sales NameSalesTotal sales
2DAVE|BARRY241 Barry241
3BARRY|JOHN472 472
4DAVE|JOHN2055
5

<COLGROUP><COL style="WIDTH: 30px; FONT-WEIGHT: bold"><COL style="WIDTH: 92px"><COL style="WIDTH: 112px"><COL style="WIDTH: 79px"><COL style="WIDTH: 30px"><COL style="WIDTH: 64px"><COL style="WIDTH: 64px"><COL style="WIDTH: 73px"><COL style="WIDTH: 30px"></COLGROUP><TBODY>
</TBODY>

Spreadsheet Formulas
CellFormula
F2{=IFERROR(INDEX(B$2:B$4,SMALL(IF(ISNUMBER(SEARCH($E$2,$A$2:$A$4)),ROW(B$2:B$4)),ROWS(F$2:F2))-ROW($A$2)+1),"")}

<TBODY>
</TBODY>
Formula Array:
Produce enclosing
{ } by entering
formula with CTRL+SHIFT+ENTER!

<TBODY>
</TBODY>


Excel tables to the web >> Excel Jeanie HTML 4

The formula in F2 needs to be entered using ctrl shift enter and NOT just enter, it can then be copied across and down. You will obviously have to change the cell references to suit your layout.

I hope that helps.

Ak
 
Upvote 0
Hi,

Can you post the formula that you are using?

Also, which version of Excel are you using?

Ak
 
Upvote 0

Forum statistics

Threads
1,214,968
Messages
6,122,506
Members
449,089
Latest member
RandomExceller01

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