Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-11-2012, 11:22 PM
gsrikanth gsrikanth is offline largest string Windows XP largest string Office XP
Competent Performer
largest string
 
Join Date: Dec 2011
Posts: 133
gsrikanth is on a distinguished road
Default largest string

A1 B1
A2 B2


three one
two three

in A1 cell i need a formula
compare B1,A2,B2 in this 3 cell length of which cell is larger come string in A1
Reply With Quote
  #2  
Old 05-12-2012, 01:53 AM
macropod's Avatar
macropod macropod is offline largest string Windows 7 64bit largest string Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,367
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

That is pretty basic:
=MAX(LEN(B1),LEN(B2),LEN(A2))
returns the greatest string length and:
=IF(LEN(B1)=MAX(LEN(B1),LEN(B2),LEN(A2)),B1,"")&IF (LEN(B2)=MAX(LEN(B1),LEN(B2),LEN(A2)),B2,"")&IF(LE N(A2)=MAX(LEN(B1),LEN(B2),LEN(A2)),A2,"")
returns the longest string(s).
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to extract only numbers from a STRING? Learner7 Excel 3 07-02-2013 06:25 AM
String conversion formula? JGTExcel Excel 3 02-10-2012 04:39 PM
Export string from e-mail body to .csv aphrodita Outlook 0 01-05-2012 08:53 AM
largest string Can't See Attachments When E-mail String is Saved to PDF wineattorney Outlook 1 03-29-2011 02:15 AM
Extract from String using Wildcard whousedmy Word 0 05-21-2009 01:35 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:22 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft