Name extraction

Obewan

Board Regular
Joined
Aug 25, 2021
Messages
68
Office Version
  1. 365
Platform
  1. Windows
I have a formula which extracts the name in column C. I also need one which extracts the same name in column B but the answer must appear on the same row (see below) - the range for the formula I need need to cover rows 2:4500 for all columns as there is a lot of data. So I am assuming the formula would say if the name appears in column C then identify the same name on column A and and write the name in column B

Book1
ABC
1DATAANSWER new formulaDATA USING A FORMULA TO get name
2Rug/Greyhound (box)
3Rug 1BURN THE EDGEBURN THE EDGE
4Rug 2KICKING STONESKICKING STONES
5Rug 3ZAMBORA LOLA
6Rug 4LIAR FOR HIRELIAR FOR HIRE
7Rug 5VACANT BOX
8Rug 6KINGSBRAE ANNAKINGSBRAE ANNA
9Rug 7ALL RUMALL RUM
10Rug 8LEON KINGSBRAELEON KINGSBRAE
11Tips:Rug 2Rug 4Rug 1Rug 6
12Rug 1
13BURN THE EDGEBK / D Jan-20 Zipping Garth x Specs ValleyBURN THE EDGE
14Trainer: Desmond Winters (Rushforth)Owner: Robert Macmurray
15Prizemoney: $24,940Best Win Times:GRA 19.95CAS 16.84CAS 23.50
Sheet1
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
I have a formula which extracts the name in column C.
Then why are some rows in column C blank?

Assuming blanks are possible in column C then try something like this

23 09 08.xlsm
ABC
1DATAANSWER new formulaDATA USING A FORMULA TO get name
2Rug/Greyhound (box)
3Rug 1BURN THE EDGEBURN THE EDGE
4Rug 2KICKING STONESKICKING STONES
5Rug 3ZAMBORA LOLA
6Rug 4LIAR FOR HIRELIAR FOR HIRE
7Rug 5VACANT BOX
8Rug 6KINGSBRAE ANNAKINGSBRAE ANNA
9Rug 7ALL RUMALL RUM
10Rug 8LEON KINGSBRAELEON KINGSBRAE
11Tips:Rug 2Rug 4Rug 1Rug 6
12Rug 1
13BURN THE EDGEBK / D Jan-20 Zipping Garth x Specs ValleyBURN THE EDGE
14Trainer: Desmond Winters (Rushforth)Owner: Robert Macmurray 
15Prizemoney: $24,940Best Win Times:GRA 19.95CAS 16.84CAS 23.50 
Get Name
Cell Formulas
RangeFormula
B13:B15B13=FILTER(C$2:C$10,ISNUMBER(SEARCH(C$2:C$10,A13))*(C$2:C$10<>""),"")
 
Upvote 0
Then why are some rows in column C blank?

Assuming blanks are possible in column C then try something like this

23 09 08.xlsm
ABC
1DATAANSWER new formulaDATA USING A FORMULA TO get name
2Rug/Greyhound (box)
3Rug 1BURN THE EDGEBURN THE EDGE
4Rug 2KICKING STONESKICKING STONES
5Rug 3ZAMBORA LOLA
6Rug 4LIAR FOR HIRELIAR FOR HIRE
7Rug 5VACANT BOX
8Rug 6KINGSBRAE ANNAKINGSBRAE ANNA
9Rug 7ALL RUMALL RUM
10Rug 8LEON KINGSBRAELEON KINGSBRAE
11Tips:Rug 2Rug 4Rug 1Rug 6
12Rug 1
13BURN THE EDGEBK / D Jan-20 Zipping Garth x Specs ValleyBURN THE EDGE
14Trainer: Desmond Winters (Rushforth)Owner: Robert Macmurray 
15Prizemoney: $24,940Best Win Times:GRA 19.95CAS 16.84CAS 23.50 
Get Name
Cell Formulas
RangeFormula
B13:B15B13=FILTER(C$2:C$10,ISNUMBER(SEARCH(C$2:C$10,A13))*(C$2:C$10<>""),"")
Genius!! Thank you!!
 
Upvote 0
You are welcome.

But I am still wondering why some of those rows in column C do not have the name extracted since you have a formula to do that?
 
Upvote 0
The ones in columnn C are scratched and not running in the race. BTW I just noticed this formula stops working at row 1036 for some reason and I get SPILL? Any ideas. Here is the full formula with the one above in bold:
=IF(RIGHT(A1036,6)="Months","",IF(X1035="",IF(LEFT(A1037,3)="Tra",FILTER(AT$2:AT$4500,ISNUMBER(SEARCH(AT$2:AT$4500,A1036))*(AT$2:AT$4500<>""),""),""),X1035))
 
Upvote 0
Actually don't worry its a question for another thread as I have found the error but don't know the answer yet
 
Upvote 0
I have not looked for or come across your other thread but a spill error means that the formula has found more than one value in AT2:AT4500 that can be found in A1036. That could happen, for example, if A1036 was "Rug 23CHATBOX" and column A contained, say, "CHATBOX" and "HAT"

If you have a solution from this thread and want to mark it, please mark the actual post that contains the answer. I have removed the mark from post #3 as clearly "Genius!! Thank you!!" is not the answer to your original thread question. :biggrin:
 
Upvote 0
I have not looked for or come across your other thread but a spill error means that the formula has found more than one value in AT2:AT4500 that can be found in A1036. That could happen, for example, if A1036 was "Rug 23CHATBOX" and column A contained, say, "CHATBOX" and "HAT"

If you have a solution from this thread and want to mark it, please mark the actual post that contains the answer. I have removed the mark from post #3 as clearly "Genius!! Thank you!!" is not the answer to your original thread question. :biggrin:
Yeah sometimes it can have two names of the same in the column - let me see what I can do to fix that. Thought that could be the issue but couln't find it yet.
 
Upvote 0
If you want all matches listed & avoid the SPILL error try
Excel Formula:
=IF(RIGHT(A1036,6)="Months","",IF(X1035="",IF(LEFT(A1037,3)="Tra",TEXTJOIN(", ",1,FILTER(AT$2:AT$4500,ISNUMBER(SEARCH(AT$2:AT$4500,A1036))*(AT$2:AT$4500<>""),"")),""),X1035))
 
Upvote 0

Forum statistics

Threads
1,215,842
Messages
6,127,230
Members
449,371
Latest member
strawberrish

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