+ Reply to Thread
Results 1 to 12 of 12

COUNTING A CELL's DATA

  1. #1
    Registered User
    Join Date
    09-10-2008
    Location
    Pakistan
    Posts
    10

    COUNTING A CELL's DATA

    Hey all,

    i want to count the integers/numbers in a particular cell. For example
    a1 = 123456789

    now i want a formula which count these numbers for me and give me result that will be = 9. Can any one help me on it.

    Please reply soooon
    Last edited by koa786; 09-10-2008 at 03:53 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    09-23-2005
    Location
    Bristol, UK
    MS-Off Ver
    2007
    Posts
    664
    Hi,

    Assuming you data is in A1, try:

    Please Login or Register  to view this content.
    HTH,

    SamuelT

  3. #3
    Valued Forum Contributor
    Join Date
    08-26-2008
    Location
    singapore
    Posts
    626
    use this if you don't want to count the decimal point


    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    09-10-2008
    Location
    Pakistan
    Posts
    10
    Thanks buddy it worked

  5. #5
    Registered User
    Join Date
    09-10-2008
    Location
    Pakistan
    Posts
    10
    NOW ONE MORE THING.

    IF I WANT TO USE AN IF STATEMENT USING THIS FORMULA WHAT WILL BE THE STATEMENT.

    i mean i want some like
    if LEN(A1) = 12 return me TRUE else FALSE

    REPL SOON

  6. #6
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    Hi Koa,
    please restrain from using upper case phrases in your thread.
    As you know, on the Net, this is equivalent to shouting, which, I think, is not necessary here.
    Cheers

  7. #7
    Forum Contributor
    Join Date
    07-23-2006
    Posts
    185
    Please Login or Register  to view this content.
    I'm really sure this conditional IF format can also be found in the Excel help section.

  8. #8
    Registered User
    Join Date
    09-10-2008
    Location
    Pakistan
    Posts
    10
    ok arthur i'll try not to write in capital letters.


    thanks attitude. it worked.

    i am not very much familiar with the excel help section. i try to use that but couldn't find it out.


    any ways thanks for the help

  9. #9
    Registered User
    Join Date
    09-10-2008
    Location
    Pakistan
    Posts
    10
    here i am again with another problem.

    the problem is this.


    cell A1 has a value = 1234567.12

    now i want that if the values before decimal is = 7 and after decimal is = 2 return true, else false.

    reply soon

  10. #10
    Valued Forum Contributor
    Join Date
    08-26-2008
    Location
    singapore
    Posts
    626
    =and(mod(int(a1),10)=7,int(mod(a1,1)*10)=2)
    I need your support to add reputations if my solution works.


  11. #11
    Registered User
    Join Date
    09-10-2008
    Location
    Pakistan
    Posts
    10

    Unhappy

    i can't make this formula work. is there any other option.


    let me repeat my question.

    Cell A1 = 1234567.12

    If (Len(A1)[B4 decimal]=7 and Len(A1)[After Decimal] = 2, TRUE,FALSE)

    can any one please make a formula for it.
    Last edited by koa786; 09-17-2008 at 10:37 PM.

  12. #12
    Forum Contributor
    Join Date
    07-23-2006
    Posts
    185
    Try this:
    Please Login or Register  to view this content.
    This will count out to 50 decimal places. That should be enough...but 3 would suffice for your =2 condition.

    But this will give you flexibility. Being as we are just counting the LEN() of the characters before the decimal point, Number-INT(Number) or TRUNC() will work equally.

+ 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. data is always in different cells
    By kinder in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-21-2008, 10:41 AM
  2. Linked Cells Corrupted by Data Sorting
    By catmandu57 in forum Excel General
    Replies: 1
    Last Post: 12-07-2007, 03:19 PM
  3. Replies: 3
    Last Post: 05-12-2007, 08:12 AM
  4. Shifting online data comes to excel to be shifted to adjacent cells as per formula
    By cramatr in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-05-2007, 08:30 PM
  5. copying only cells in a filter with data
    By guerilla in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-06-2006, 06:32 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