Results 1 to 4 of 4

Thread: How can I subtract excel cell values that contain both a number and alphabets

  1. #1
    Join Date
    Dec 2011
    Posts
    4

    How can I subtract excel cell values that contain both a number and alphabets

    I have measurement data from an ATE system where the results are given as both a number and 'unit' letters for example 22.3 dB, 2.109 MHz, 12.06 V and 0.175 A. To calculate temperature drift from these readings, I need to subtract cells that contain both a number and a letter i.e.2.012 MHz - 2.005 MHz = 0.007 does not matter if the answer contains the 'units' or not. Anyone know how I can achieve this ?

  2. #2
    Join Date
    Jun 2011
    Posts
    635

    Re: How can I subtract excel cell values that contain both a number and alphabets

    Assuming there is a space between the value and the suffix, you could strip the numeric value out of a cell this:
    =LEFT(M30,FIND(" ",M30))
    This will return all the characters in the string in M30 up to the space - this should be your numbers. You could then use this idea to subtract the numeric elements of two cells from each other thus:
    =LEFT(M30,FIND(" ",M30))-LEFT(M31,FIND(" ",M31))
    Hope this helps - unless there isn't a space between the number and the suffix, in which case I'll have to think again!

  3. #3
    Join Date
    Jul 2011
    Posts
    640

    Re: How can I subtract excel cell values that contain both a number and alphabets

    my last answer, just to be sure, you need to subtract 1 when you've found your space - thus, if the space occurs at the fourth position, you only want to see the first 3 characters, and so on. This version also adds the appropriate suffix onto the end of your formula.
    =LEFT(M30,FIND(" ",M30)-1)-LEFT(M31,FIND(" ",M31)-1)&" Mhz"

  4. #4
    Join Date
    Dec 2011
    Posts
    4

    Re: How can I subtract excel cell values that contain both a number and alphabets

    This was a GOOD problem. This final version strips the suffix from M30 and adds it, prefixed by a space, to your answer.
    =LEFT(M30,FIND(" ",M30)-1)-LEFT(M31,FIND(" ",M31)-1)&"
    "&RIGHT(M30,LEN(M30)-FIND(" ",M30))

    I'll go away now.

Similar Threads

  1. How to get multiple values of Vlookup in Single Cell
    By Henriksen in forum MS Office Support
    Replies: 4
    Last Post: 25-02-2012, 11:02 AM
  2. Adding digit in front of number in cell in Microsoft Excel
    By Thedevotee in forum MS Office Support
    Replies: 2
    Last Post: 07-02-2012, 07:45 PM
  3. How to remove characters between Cell values in Microsoft Excel
    By Limitless in forum MS Office Support
    Replies: 2
    Last Post: 25-01-2012, 12:08 PM
  4. How to fix a cell number in excel for mac os
    By Shaina Na in forum Windows Software
    Replies: 1
    Last Post: 08-01-2012, 11:25 AM
  5. Replies: 2
    Last Post: 04-01-2012, 06:54 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,239,676.73204 seconds with 17 queries