+ Reply to Thread
Results 1 to 5 of 5

Need a formula to indicate string that only have on full stop in decimal point in them

  1. #1
    Forum Contributor
    Join Date
    04-02-2010
    Location
    penrith
    MS-Off Ver
    Excel 2007
    Posts
    522

    Need a formula to indicate string that only have on full stop in decimal point in them

    Hi I need a formula that would look at a text and numbers string and return a 1 if the string contained a "." in it.

    For example

    String 1 john Samuels 27/12/1969 284.00

    String 2 john Richardson 28/04/1971 287.0 286.0

    The first string would return one, the second string would return a blank cell.

    Cheers

    J

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,451

    Re: Need a formula to indicate string that only have on full stop in decimal point in them

    This will count the full stops in a cell:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Do with it as you will.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Need a formula to indicate string that only have on full stop in decimal point in them

    Will you pls attach a sample excel file with desired result
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,451

    Re: Need a formula to indicate string that only have on full stop in decimal point in them

    Thanks for the rep.

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Need a formula to indicate string that only have on full stop in decimal point in them

    Try this...

    Data Range
    A
    B
    1
    john Samuels 27/12/1969 284.00
    1
    2
    john Richardson 28/04/1971 287.0 286.0
    3
    ------


    This formula entered in B1 and copied down:

    =IF(LEN(A1)-LEN(SUBSTITUTE(A1,".",""))=1,1,"")
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 9
    Last Post: 04-14-2015, 11:20 AM
  2. Minor formatting issue: allow capturing a (.) full-stop as decimal
    By onmyway in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-13-2015, 03:34 AM
  3. Add decimal point to string
    By DeeEll in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-14-2014, 09:01 AM
  4. Replies: 2
    Last Post: 06-29-2012, 07:52 PM
  5. Decimal Point Formula
    By apocwales in forum Excel General
    Replies: 1
    Last Post: 09-05-2008, 07:42 AM
  6. [SOLVED] how do I stop excel putting a space after a decimal point
    By Billious in forum Excel General
    Replies: 1
    Last Post: 02-16-2006, 04:25 AM

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1