Monday, July 16, 2012

Adding up totals dependant on flags

There has been an occasion where I have need to add up entries from a list depending if a certain condition has been met. In this occasion it was adding up which hours were overtime or not. In this case I ended the overtime hours with a £

Where A1:A5 data equals


2



{=SUM(1*IF(RIGHT(A$1:A$5,1)="£",MID(A$1:A$5,2,LEN(A$1:A$5)-2),0))} = 5

*note
This is an array formula so use Ctrl Shift & Enter to add curly brackets

No comments:

Post a Comment