Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-17-2012, 03:51 AM
poobear poobear is offline Calculate differences between text cells? Mac OS X Calculate differences between text cells? Office for Mac 2011
Novice
Calculate differences between text cells?
 
Join Date: May 2011
Posts: 6
poobear is on a distinguished road
Default Calculate differences between text cells?

Hi everyone!

I have several cells with characters (amino acid sequences), but let's simplify to this:

ABCDEF
ABADEF
ABCDEG
ABCDEF

I would like to compare all cells to the first cell and get the difference sort of like this:

ABCDEF: -
ABADEF: 1
ABCDEG: 1


ABCDEF: 0

Then I will calculate these changes to percentage, but that I know..

But how can I get the amount of one-letter substitutions for each cell?

Thanks!
Reply With Quote
  #2  
Old 05-18-2012, 03:39 PM
Colin Legg's Avatar
Colin Legg Colin Legg is offline Calculate differences between text cells? Windows 7 32bit Calculate differences between text cells? Office 2010 32bit
Expert
 
Join Date: Jan 2011
Location: UK
Posts: 369
Colin Legg will become famous soon enough
Default

Hi,

If they're always 6 characters long then the usual, native formula approach can be simplified to this:
Code:
=SUM(--(MID(A3,{1,2,3,4,5,6},1)=MID(A2,{1,2,3,4,5,6},1)))
Reply With Quote
  #3  
Old 05-19-2012, 06:43 AM
poobear poobear is offline Calculate differences between text cells? Mac OS X Calculate differences between text cells? Office for Mac 2011
Novice
Calculate differences between text cells?
 
Join Date: May 2011
Posts: 6
poobear is on a distinguished road
Default

Wow that worked perfect, thank you so much!

Meanwhile I created my own solution, but let me tell you how less elegant it is. The cells are not 6 characters, but always 28. In 28 columns I extract the individual characters with the MID command. In 28 more columns I use he EXACT command to get a TRUE or FALSE value depending on if the character is the same or not. In another column I calculate how many TRUE values I have for each row. That's 57 columns instead of your 1!
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculate differences between text cells? Wraping merged cells text - the text dissapears shabbaranks Excel 1 03-02-2012 02:35 AM
Calculate differences between text cells? Combining Text from Table Cells robmorleyuk Word 1 11-01-2011 07:24 AM
Question regarding differences among styles bigsnowdog Word 0 08-01-2010 02:41 PM
Cells with wrap text not showing text lazylew Excel 1 08-31-2008 06:58 AM
Calculate differences between text cells? How to get cells to calculate time? jrasche2003@yahoo.com Excel 2 02-09-2007 07:10 AM

Other Forums: Access Forums

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


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