Full name

hsandeep

Well-known Member
Joined
Dec 6, 2008
Messages
1,217
Office Version
  1. 2010
Platform
  1. Windows
  2. Mobile
Column B & column C contains NAMES. But they can be different in the sense either of the column may contain more no. of words which are only separated by 'a blank'. How to get the larger NAME?
EX:
Column B=PETER SHIRT
Column C=PETER ENGLAND SHIRT
Answer is Column D=PETER ENGLAND SHIRT
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
could you not just see which is longer and choose it?
eg
Code:
=if(len(B1) > Len (C1),B1,C1)
 
Upvote 0
This formula works. But sometimes column C=#N/A & column B=value (alphanumerical). Answer should be=column B.
If column B=#N/A & column C=value (alphanumerical). Answer should be=column C.
 
Upvote 0
Try

=IF(ISNA(B2),C2,IF(ISNA(C2),B2,IF(LEN(B2)>LEN(C2),B2,C2)))
 
Upvote 0
This was exactly what I was looking for. Thanks.
 
Upvote 0

Forum statistics

Threads
1,216,520
Messages
6,131,135
Members
449,626
Latest member
Stormythebandit

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