+ Reply to Thread
Results 1 to 4 of 4

Convert Letter to Number then add together

  1. #1
    Registered User
    Join Date
    08-16-2016
    Location
    Asbury, NJ
    MS-Off Ver
    2007
    Posts
    2

    Convert Letter to Number then add together

    I'm working on a form for payroll, basically I have a layout of Sunday - Saturday along with Vacation column, AI day column and Holiday with the option of how many hours the employee worked that day, a V for a vacation day, an A for an Attendance Incentive day or a H for a Holiday. I know how to convert the letters into numbers and add them together but what I can't seem to get to work is returning a blank cell if there is no number or if the total = 0.
    Please Login or Register  to view this content.
    The above code works fine but it always leave a "0" in the cell if there are no V's during the particular week. If I remove the "0" and leave it as "" the code no longer works.
    Please Login or Register  to view this content.
    I have tried variations of using SUM but no luck. I greatly appreciate any help or tips on a working version of this formula.

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Convert Letter to Number then add together

    First, why is it so complicated using Code-78..
    Why not just put 8 ?
    =IF(B2="","0",(IF(B2="V",8)))+IF(C2="","0",(IF(C2="V",8)))

    Anyway, you should be able to utilize countif for this as well.
    =COUNTIF(B2:C2,"V")*8

    And if none of them are "V", leave it ""
    Try
    =IF(COUNTIF(B2:C2,"V")=0,"",COUNTIF(B2:C2,"V")*8)

  3. #3
    Registered User
    Join Date
    08-16-2016
    Location
    Asbury, NJ
    MS-Off Ver
    2007
    Posts
    2

    Re: Convert Letter to Number then add together

    @Jonmo1
    Thank You! I was just way over thinking this... It works perfect.

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Convert Letter to Number then add together

    You're welcome.

+ 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. how to convert letter to number .
    By choy96 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 09-12-2014, 04:08 AM
  2. Convert number into letter, it is possible?
    By Exxcel Noob in forum Excel General
    Replies: 7
    Last Post: 05-02-2012, 05:24 PM
  3. Excel 2007 : Convert a letter to a number
    By CamnJane in forum Excel General
    Replies: 3
    Last Post: 10-25-2011, 10:52 PM
  4. Convert letter to Number
    By gtmeloney in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-23-2009, 11:10 AM
  5. How to convert column number to letter
    By iturnrocks in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-21-2007, 09:51 AM
  6. [SOLVED] convert column number to letter
    By lvcha.gouqizi in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 10-31-2005, 12:05 PM
  7. [SOLVED] How do I convert a given number into a letter?
    By vortex0001 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-08-2005, 06:05 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