+ Reply to Thread
Results 1 to 3 of 3

How to convert a character into an integer

  1. #1
    Registered User
    Join Date
    10-05-2011
    Location
    Las Vegas, Nevada
    MS-Off Ver
    Excel 2007
    Posts
    2

    How to convert a character into an integer

    I'm rather new to VBA and excel. I have a similar situation to this post. I would like to convert a character, in this instance a "check mark," into an integer value of either one or negative one. I have found the SUBSTITUTE function, but I am not sure how to use it. Could someone show me a step-by-step process to achieve this? My goal is to COUNT the number of check marks in a column, as either a positive or negative number. I know I can use NUMBERS within a column and then use the COUNT function to achieve the results, but I would like to use a check mark instead. Thank you.
    Last edited by aquar; 10-27-2011 at 12:29 AM. Reason: solved issue.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: How to convert a character into an integer

    Can you clarify how you're adding the check mark ? (ie symbol or via font)

    Pending answer to the above you may find a standard COUNTIF will suffice.

    If possible post a sample file that illustrates your checkmark entry.

  3. #3
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: How to convert a character into an integer

    If the checkmark in B1; then put into C1

    PHP Code: 
    =code(lower(B1))-96 



+ 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