Ignore All The Dashes And Return The Name Only

Turk182

Board Regular
Joined
Sep 9, 2009
Messages
66
Office Version
  1. 365
Platform
  1. MacOS
Hello All.

I have an Excel sheet for which MOST cells of each row have a dash ONLY (Columns "G" Thru "P"). ONE cell in the row will have a name (either "Bob", "Carol","Ted", or "Alice").
I need an Excel formula that will ignore all the dashes and return the name only (in whichever column it is found) and place the name in column "A" (formula column) of that row.

Is that possible with just formulas?
Thx, Turk182
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Another option
Excel Formula:
=FILTER(G2:P2,(G2:P2<>"-")*(G2:P2<>""))
 
Upvote 0
Since you are using XL365, either of these would also work...

=SUBSTITUTE(CONCAT(G2:P2),"-","")

=CONCAT(IF(G2:P2="-","",G2:P2))
 
Upvote 0
One more formula that will work in any version of Excel...

=LOOKUP(2,1/(G2:P2<>"-"),G2:P2)
 
Upvote 0
One more formula that will work in any version of Excel...

=LOOKUP(2,1/(G2:P2<>"-"),G2:P2)
Thanks Rick! I appreciate the various approaches/"routes" to achieve the goal, and to learn formulas who is flexibility makes them seem like "languages"!!
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,220
Messages
6,123,698
Members
449,117
Latest member
Aaagu

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