• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

SUMIFS - color as criteria with other

Hi Gurus,

I need the help to write the VBA code or standard function to do the SUMIFS - with both criteria as colour and value.

Sample data with required results attached

Urgent - response requested.

Regards

Shoaib
 

Attachments

  • SIUMIFS-COLOR+VALUE.xlsx
    10.2 KB · Views: 6
Try this formula solution by,

1] Define 2 Names :

>> Select B17 >> Define Name >>

>> Name (1) : SumRgn

>> Refer to :
=INDEX($D$5:$I$10,MATCH($A17,$A$5:$A$10,0)+MATCH(LOOKUP("zz",$B$15:B$15),{"Onsite";"OffSite"},0)-1,0)

>>OK

And,

>> Name (2) : SumColor

>> Refer to :
=SUMPRODUCT(0+(GET.CELL(63,IF(1,+OFFSET(SumRgn,,COLUMN($D$4:$I$4)-MIN(COLUMN($D$4:$I$4)))))=GET.CELL(63,B$16)),SumRgn)

>>OK

2] In B17, formula copied across to G17 and all copied down :

=SumColor

p.s. : Get.Cell() is a Excel 4 Macro function, so you need to save file as Macro-Enable Workbook xlsm type.

Regards
Bosco
 

Attachments

  • SIUMIFS-COLOR+VALUE(1).xlsm
    11.2 KB · Views: 11
Last edited:
Back
Top