How Sum the Column value in Excel via VBA based on criteria?

Solved/Closed
Raj_2823 Posts 7 Registration date Monday August 29, 2022 Status Member Last seen January 13, 2023 - Oct 3, 2022 at 06:16 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Oct 10, 2022 at 12:01 PM

Hello All,

I would like to sum up the column value based on the following criteria (TRUE or FALSE). I have a value in the "E" column and in the "F" column having criteria (TRUE or FALSE). I have to sum the "TRUE" value in the Billable column and the "FALSE" value in the Non-billable column.

The screenshot is given below for reference.

Thanks in advance!

Regards,

Raj

Related:

2 responses

TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 555
Updated on Oct 10, 2022 at 12:03 PM

Wanted to add the following:

To count the actual values for TRUE and FALSE, use these array formula's:
=SUM((E5:E17)*(F5:F17=FALSE))
=SUM((E5:E17)*(F5:F17=TRUE))
NOTE: Array formula's need to be confirmed by hitting Ctrl+Shift+Enter instead of just Enter.


3
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 555
Oct 4, 2022 at 11:50 AM

Hi Raj,

You are looking for the COUNTIF function.

=COUNTIF(F5:F17,FALSE)

Best regards,
Trowa


2