View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JC-PS JC-PS is offline
external usenet poster
 
Posts: 29
Default How to add (sum) a row cells with letter(s) aside or without n

Thanks Hector, up to the moment the option formula,
=countif(c3:n3,"le")*7.5+sumproduct(if(left( c3:n3,2)="le",
--substitute(lower(c3:n3),"le",0))) with CSE smoothly doing its
work.

_____---___---____

data:
[C3] -
[D3] L
[E3] LE
[G3] S
[J3] W
[N3] LE3.5

this is what you post as needed:
results:
[Q3] 7.5
[R3] 11
[W3] 7.5
[X3] -
[AA3] 7.5

suggested formulae:

[Q3] =countif(c3:n3,"l")*7.5
[R3] =countif(c3:n3,"le")*7.5+sumproduct(if(left(c3:n3, 2)="le",--substitute(lower(c3:n3),"le",0)))
the above is an array-formula ctrl + shift + enter
[W3] =countif(c3:n3,"s")*7.5
[X3] =countif(c3:n3,"se")*7.5
[AA3] =countif(c3:n3,"w")*7.5

please, revise and adapt/modify suggested array-formula in [R3] according other "expected" representacion (letters & numbers)

hth,
hector.

__ OP __
The table of Regular Register Licenses should be like shown here afterward.
The licenses of other kinds like LF, SF, WF, A, B, M, O, U and CL with hours used by the employee are posted on other table not in the main one of L, LE, S, SE & W.
The possibility of numbers beside a letter or two should be considered here in the summation too.
The main table should look like a week format days on a two week bases or be-weekly, and a regular calender from January to December of the current year right on the left side of the table downward (from line A3 to A29).
Line 3 starting on C column is the first cell or Monday of January alongside up to Friday of the second week for the first be-weekly of that month. Totals of hours used by worker on those weeks either for L, LE or S, SE and even W should end up to a column aside in the same order of letters shown:Q,
R, W, X and AA for the "Ws".
Example:
...A......................B..........C........D... ........J.....
2........................Monday.Tues...Wends...Fri day
3.01/12/08............-............L.........LE.........S....

..... ...K.........N..........Q..............R.......... ..W.......
2....Monday...Friday...VacationL..VacationLE..Sick-S
3....W..........LE3.5.....7.5............11....... .....7.5...

.....X.........W ..... -----------------------------------
Sick-SE.....No Pay....---------------------------------
.....-.........7.5..... -----Note that those day present are show just with a "-" meaning no license used, like on B3 and the other days not shown here.------------------------------


I hope might be helpful, the first time trying making a table outside Excel is badly awful.
Any question be glad to answer it.