ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Grand total based on conditions within an array (https://www.excelbanter.com/excel-discussion-misc-queries/96139-grand-total-based-conditions-within-array.html)

[email protected]

Grand total based on conditions within an array
 
Hi,

Just can't figure this one out.

I have a table with the following columns:

A Week commencing (Monday's date)
B Daily chargeout rate for that week (it varies from week to week)
C Monday - site visited
D Tuesday - site visited
E Wednesday - site visited
F Thursday - site visited
G Friday - site visited

Each row is for a different week

I need to be able to calculate a grand total for each site. For
example for Site A, I need to find all instances of "A" in columns C to
G of the table and for each of these use the relevant week's daily
chargeout rate (given in column B) and total these for the whole table.
Same for Site B etc.

Have tried mixtures of SUMIF and COUNTIF but to no avail. Any help
appreciated!


Bob Phillips

Grand total based on conditions within an array
 
=SUMPRODUCT((C2:G20="A")*(B2:B20))

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

wrote in message
oups.com...
Hi,

Just can't figure this one out.

I have a table with the following columns:

A Week commencing (Monday's date)
B Daily chargeout rate for that week (it varies from week to week)
C Monday - site visited
D Tuesday - site visited
E Wednesday - site visited
F Thursday - site visited
G Friday - site visited

Each row is for a different week

I need to be able to calculate a grand total for each site. For
example for Site A, I need to find all instances of "A" in columns C to
G of the table and for each of these use the relevant week's daily
chargeout rate (given in column B) and total these for the whole table.
Same for Site B etc.

Have tried mixtures of SUMIF and COUNTIF but to no avail. Any help
appreciated!




[email protected]

Grand total based on conditions within an array
 
Perfect Bob. Thank you!!!



All times are GMT +1. The time now is 02:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com