Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I have a time sheet that where I want to do various totals. When it's hours
worked, no problem. This department also uses letters (P, V, H) to indicate time off with pay (personal, vacation, holiday). They would also like to use the lower case version to indicate half a day. How do a get a sum or sumif function to see the letters as their numeric equivalent and total them with the other numbers entered? I know this is probably overly simple for this site, but I can't find it in the Help section or I can't phrase the question will enough for Help to find my answer. Thanks, -- WJG |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Since most Excel functions are case insensitive, I think using H for one
thing and h for another is adding a horrid complication, How about H and HH ? With this in A1:J1 h , , h, h, , 3, hh, 1, 2, 3 I used =SUM(A1:J1)+COUNTIF(A1:J1,"h")*4+COUNTIF(A1:J1,"hh ")*8' to get a value of 29: 3+1+2+3 = 9, each h is worth 4 (4*4=12) and each hh is worth 8 (1*8=8) giving 9+12+8 = 29 best wishes -- Bernard Liengme Microsoft Excel MVP http://people.stfx.ca/bliengme "Galadad" wrote in message ... I have a time sheet that where I want to do various totals. When it's hours worked, no problem. This department also uses letters (P, V, H) to indicate time off with pay (personal, vacation, holiday). They would also like to use the lower case version to indicate half a day. How do a get a sum or sumif function to see the letters as their numeric equivalent and total them with the other numbers entered? I know this is probably overly simple for this site, but I can't find it in the Help section or I can't phrase the question will enough for Help to find my answer. Thanks, -- WJG |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On Mon, 11 Jan 2010 15:57:04 -0400, "Bernard Liengme"
wrote: Since most Excel functions are case insensitive, I think using H for one thing and h for another is adding a horrid complication, How about H and HH ? With this in A1:J1 h , , h, h, , 3, hh, 1, 2, 3 I used =SUM(A1:J1)+COUNTIF(A1:J1,"h")*4+COUNTIF(A1:J1,"hh ")*8' to get a value of 29: 3+1+2+3 = 9, each h is worth 4 (4*4=12) and each hh is worth 8 (1*8=8) giving 9+12+8 = 29 best wishes With the example input, but with H instead of hh, here is an alternative formula that gives the same result, ie 29: =SUM(IF(A1:J1="",0,IF(ISNUMBER(A1:J1),A1:J1,CHOOSE (FIND(A1:J1,"hHXxZzY"),4,8,10,20,30,40,50)))) Note: This is an array formula that has to be confirmed with CTRL+SHIFT+ENTER rather than just ENTER. The XxZzY and ,10,20,30,40,50 is just to indicate that you can add more letter codes with there corresponding "values" to this example. So if you have many single letter codes to handle, CHOOSE can handle 254 values, this formula might be a little shorter. Hope this helps / Lars-Åke |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Count only Letters in cells that contain both letters and numbers | Excel Worksheet Functions | |||
Finding most common occurence of values in cells containing letters and numbers | Excel Worksheet Functions | |||
Sorting - cells containing numbers, numbers and letters | Excel Discussion (Misc queries) | |||
Numbers to Letters? | Excel Discussion (Misc queries) | |||
create self-generating numbers with letters and numbers | Excel Discussion (Misc queries) |