Full name

hsandeep

Well-known Member
Joined
Dec 6, 2008
Messages
1,226
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

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
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

Forum statistics

Threads
1,223,243
Messages
6,170,964
Members
452,371
Latest member
Frana

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