What I'm trying to do is add strings with multiple values, for example;
in one cell, user enters 1F, then in another cell they enter 0.4F, I want 1.4F when I sum them up. Basically I'm counting special hours of work for each month (normal hours don't have the "F" which I have no problems with).
I'm also calling upon other worksheets, so below is a small chunk of the code I'm using. The problem with this method is that I need to manually input the value for each string.
(COUNTIF(JAN!B2:JAN!AF2,"1F") + COUNTIF(FEB!B2:FEB!AC2,"1F") + COUNTIF(MAR!B2:MAR!AF2,"1F") + COUNTIF(APR!B2:APR!AE2,"1F") + COUNTIF(MAY!B2:MAY!AF2,"1F") + COUNTIF(JUN!B2:JUN!AE2,"1F") + COUNTIF(JUL!B2:JUL!AF2,"1F") + COUNTIF(AUG!B2:AUG!AF2,"1F") + COUNTIF(SEP!B2:SEP!AE2,"1F") + COUNTIF(OCT!B2:OCT!AF2,"1F") + COUNTIF(NOV!B2:NOV!AE2,"1F") + COUNTIF(DEC!B2:DEC!AF2,"1F")) + ((COUNTIF(JAN!B2:JAN!AF2,"1/2F") + COUNTIF(FEB!B2:FEB!AC2,"1/2F") + COUNTIF(MAR!B2:MAR!AF2,"1/2F") + COUNTIF(APR!B2:APR!AE2,"1/2F") + COUNTIF(MAY!B2:MAY!AF2,"1/2F") + COUNTIF(JUN!B2:JUN!AE2,"1/2F") + COUNTIF(JUL!B2:JUL!AF2,"1/2F") + COUNTIF(AUG!B2:AUG!AF2,"1/2F") + COUNTIF(SEP!B2:SEP!AE2,"1/2F") + COUNTIF(OCT!B2:OCT!AF2,"1/2F") + COUNTIF(NOV!B2:NOV!AE2,"1/2F") + COUNTIF(DEC!B2:DEC!AF2,"1/2F"))*(1/2)) + ((COUNTIF(JAN!B2:JAN!AF2,"1/4F") + COUNTIF(FEB!B2:FEB!AC2,"1/4F") + COUNTIF(MAR!B2:MAR!AF2,"1/4F") + COUNTIF(APR!B2:APR!AE2,"1/4F") + COUNTIF(MAY!B2:MAY!AF2,"1/4F") + COUNTIF(JUN!B2:JUN!AE2,"1/4F") + COUNTIF(JUL!B2:JUL!AF2,"1/4F") + COUNTIF(AUG!B2:AUG!AF2,"1/4F") + COUNTIF(SEP!B2:SEP!AE2,"1/4F") + COUNTIF(OCT!B2:OCT!AF2,"1/4F") + COUNTIF(NOV!B2:NOV!AE2,"1/4F") + COUNTIF(DEC!B2:DEC!AF2,"1/4F"))*(1/4))
This continues on for multiple fractions. Basically I'm counting each instance of the fraction, then multiplying it to get the value that each string should give me.
Btw: I don't actually like the fractions so I may just use integers instead, but the problem with that is I need to change multiple numbers as you can see.
A For loop or IF statement would be greatly appreciated, sorry if I made this difficult to understand.
Bookmarks