Function Help

mib1019

Member
Local time
Today, 08:41
Joined
Jun 19, 2020
Messages
88
Hello all,

I've got a spreadsheet organized roughly like this. Many more rows and 13 sets of columns(plus two total columns) for 2021-Q1 Weeks.
I need a formula for counting dates (they are in text format) across the rows at Date Count, and by row where dates are entered with comma separators (see below, bolded cells)

Hope you can help me here. I'm a bit under the gun to get this to my person tomorrow. :\

Thanks, MIB1019

ProgramWK1 DatesWK1 CostWK2 DatesWK2 CostWK3 DatesWK3 CostDate CountTotal Cost
Program 128,30,1$15005,7$100011,13,15$1500Count dates in all Dates columns (8)Sum of dollar columns
Program 229,31$10004,6,8$150012,14,16$1500Count dates in all Dates columns (8)Sum of dollar columns
Program 328,29,30,31,1$25004,5,6,7,8$250011,12,13,14,15$2500Count dates in all Dates columns (15)Sum of dollar columns
TOTALSCount 'dates' trimming '," (10)Sum FunctionCount 'dates' trimming ',"
(10)
Sum FunctionCount 'dates' trimming ',"
(11)
Sum FunctionSum of date count rows (31)Sum Total Cost
 
I have a dutch version but this will do the trick:
Code:
=LENGTE( 
  SUBSTITUEREN(
   SUBSTITUEREN(
    SUBSTITUEREN(
     SUBSTITUEREN( 
      SUBSTITUEREN(
       SUBSTITUEREN(
        SUBSTITUEREN(
         SUBSTITUEREN(
          SUBSTITUEREN(
           SUBSTITUEREN(A1
                  ;0;"")
                 ;1;"")
                ;2;"")
               ;3;"")
              ;4;"")
             ;5;"")
            ;6;"")
           ;7;"")
          ;8;"") 
         ;9;"")
        )+1
I think Lengte in the English versions is Len (or Length) and Substitueren is REPLACE.
Rince repeat replacing A1 for the cells you want to count.

I hope this helps you get rid of the gun :)
 
Simpler I think:

=LEN(F11)-LEN(SUBSTITUTE(F11,",",""))+1

F11 being the cell containing the date string in my test.
 
Thanks you guys! That works per cell. Without adding columns (and hiding them) to do a sum of the counts, any ideas?
 
Thanks you guys! That works per cell. Without adding columns (and hiding them) to do a sum of the counts, any ideas?
What do you mean by that? What Paul gave you should be all you need. Sum it where desired. If you have a further question can you upload a spreadsheet and place the desired result in the cell where you have the question:?
 
Simplest is probably this type of thing:

=(LEN(F11)-LEN(SUBSTITUTE(F11,",",""))+1) + (LEN(F12)-LEN(SUBSTITUTE(F12,",",""))+1) + (LEN(F13)-LEN(SUBSTITUTE(F13,",",""))+1)
 
Thanks you guys! That works per cell. Without adding columns (and hiding them) to do a sum of the counts, any ideas?
The formula, ok, takes some creativity, but this seriously?
 
Thank you all for the help. Nevermind my second question. Your formula(s) are all that I need.

You all rock!
MIB1019
 
Glad you got it working.
 

Users who are viewing this thread

Back
Top Bottom