+ Reply to Thread
Results 1 to 9 of 9

how do I add values prefixed with a letter

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    08-08-2008
    Location
    Belfast
    Posts
    112

    how do I add values prefixed with a letter

    Hi guys this is prob really easy easy to do but I'm stumped.

    I have a column which I simply enter overtime hours into and it is totalled up at the bottom, easy. I now have to on given days enter TOIL taken (time of in lieu) I'm thinking to distinguish from overtime hours entering it as T2 for 2 hrs TOIL etc. Is there a way that this entry can be added up recognising the T infront of the number. So far I've tried this =COUNTIF(C6:AG6,"t*") which allows me to enter T and a value but it only counts the number of times I enter a value of T3 etc and not the total. Hope that is as clear as mud. If I'm going down the wrong avenue then please point in the right direction.

    Thanks in advance
    Last edited by Davycc; 08-08-2008 at 01:52 PM.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Maybe

    =SUMPRODUCT(--(A1:A10<>""))*(MID(A1:A10,2,999)+0)
    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Forum Contributor
    Join Date
    08-08-2008
    Location
    Belfast
    Posts
    112
    If I attached a copy of the book would that help

  4. #4
    Forum Contributor
    Join Date
    08-08-2008
    Location
    Belfast
    Posts
    112
    This may help guys
    Attached Files Attached Files

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Sumif is like Countif... only it sums instead of counts...

    e.g.

    =SUMIF(C6:AG6,"t*")
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  6. #6
    Forum Contributor
    Join Date
    08-08-2008
    Location
    Belfast
    Posts
    112
    Sorry I must be stupid lol I've entered =SUMIF(C6:AG6,"t*") into AM6 and entered values into any of the cells C6 through AG6 and nothing happens

+ 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