+ Reply to Thread
Results 1 to 3 of 3

Excel and Macro cannot identify data in cell

  1. #1
    Registered User
    Join Date
    01-08-2013
    Location
    Gainesville, FL
    MS-Off Ver
    Excel 2010
    Posts
    2

    Excel and Macro cannot identify data in cell

    Hi all,

    I have an output file from a program called JWatcher which I use to code videos. I have keystrokes entered like "1," "0,", "c," and "e." The file is a .dat file that I import into Excel. I am trying to get my macro to count the number of "c" or "e" keystrokes in a column. It can correctly identify a 1 or 0, but cannot identify a c or e. I am guessing that JWatcher entered the letter as something weird (i.e., not a string?). I am using the countif and when used in my macro or by hand in the excel ws, it says there are zero c's and e's although I can clearly see them!

    Any tips on how to get it to ID those cell entries (btw, if I do a msgbox and have it return the value of the cell it does return a c or e in the msgbox)?

    Thanks in advance!

    Erica

  2. #2
    Forum Contributor
    Join Date
    04-01-2009
    Location
    Irvine, CA
    MS-Off Ver
    Excel 2010
    Posts
    280

    Re: Excel and Macro cannot identify data in cell

    Erica,

    You can try returning the code of the cell to see if it is indeed a "c" (Code for "c" is 99).
    Or, depending how you are searching, you can add the wildcard to your search "c*" in case there are extra characters at the end ("*c*" to find anywhere).

  3. #3
    Registered User
    Join Date
    01-08-2013
    Location
    Gainesville, FL
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Excel and Macro cannot identify data in cell

    Thanks so much, Chance2! You solved it When I used the countif using "*c*" it returned the correct number! Thanks again for the prompt help!

    Erica

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1