+ Reply to Thread
Results 1 to 6 of 6

Counting a value in a range ingnoring last digit

  1. #1
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb Counting a value in a range ingnoring last digit

    Data is

    2.2t
    2.2d
    2.4a
    2.3d
    2.2a

    formula should count value 2.2 (ignoring t, d, a at the end) and return 3
    note that I cannot use helper column to extract data except last digit. I have to count on same data.

    Regards
    Last edited by oldchippy; 10-24-2008 at 12:56 PM.

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097

    Thumbs up

    Quote Originally Posted by starguy
    Data is

    2.2t
    2.2d
    2.4a
    2.3d
    2.2a

    formula should count value 2.2 (ignoring t, d, a at the end) and return 3
    note that I cannot use helper column to extract data except last digit. I have to count on same data.

    Regards
    Hi starguy,

    If your data is in col A, then in B1

    =LEFT(A1,3), copy this down, then in cell B6

    =COUNTIF(B1:B5,"2.2")

    Answer = 3

    oldchippy

  3. #3
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb

    thanks for replying but I have already mentioned that I cannot use any helper column to extract data, cannot use =LEFT(A1,3) for some reason, I want to directly count 2.2.

    Regards

    Quote Originally Posted by oldchippy
    Hi starguy,

    If your data is in col A, then in B1

    =LEFT(A1,3), copy this down, then in cell B6

    =COUNTIF(B1:B5,"2.2")

    Answer = 3

    oldchippy

  4. #4
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097

    Thumbs up

    Quote Originally Posted by starguy
    thanks for replying but I have already mentioned that I cannot use any helper column to extract data, cannot use =LEFT(A1,3) for some reason, I want to directly count 2.2.

    Regards
    OK, try this

    =COUNTIF(A1:A5,"2.2"&"*")

    oldchippy

  5. #5
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb

    thanks it worked

    Quote Originally Posted by oldchippy
    OK, try this

    =COUNTIF(A1:A5,"2.2"&"*")

    oldchippy

  6. #6
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Thanks for the feedback - glad to be of assistance

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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