For the sake of simplicity / efficiency you should create a "key", eg:
AX3:
=$A3&"@"&$C3
copied down
Then, assuming the combination for city & date will appear once only (if at all) use a SUMIF in AW
AW3:
=SUMIF($AX:$AX,$E3&"@"&$C3,$AV:$AV)
If you don't use the helper the calculation will be far less efficient.
If you have multiple instances of city & date then revert SUMIF to INDEX & MATCH but you will need to add a handler if we assume the combination might not always exist.
If in doubt post a sample file.
Bookmarks