ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   sumif criteria (https://www.excelbanter.com/excel-programming/362961-sumif-criteria.html)

Dean[_8_]

sumif criteria
 
It looks like the criteria in such a function must be something hard-coded, rather than say $e$4, where $e$4 is a cell in the worksheet.

Is that correct, or is there a way to do it with a cell being part of the criteria?

Thanks!
Dean

Ron Coderre

sumif criteria
 
Try something like this:

=SUMIF(A1:A100,""&$E$4,B1:B100)

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Dean" wrote:

It looks like the criteria in such a function must be something hard-coded, rather than say $e$4, where $e$4 is a cell in the worksheet.

Is that correct, or is there a way to do it with a cell being part of the criteria?

Thanks!
Dean


Dean[_8_]

sumif criteria
 
Wow, it sure seems to! Given the normal formatting options as (poorly?)
described in EXCEL help (32, 32, "32", etc), I'm not sure why this works,
but it sure seems to.

I can't imagine why your approach isn't in their help section. Surely,
there must be a need for using a cell reference pretty often.

Thank you very much.

Dean

"Ron Coderre" wrote in message
...
Try something like this:

=SUMIF(A1:A100,""&$E$4,B1:B100)

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Dean" wrote:

It looks like the criteria in such a function must be something
hard-coded, rather than say $e$4, where $e$4 is a cell in the worksheet.

Is that correct, or is there a way to do it with a cell being part of the
criteria?

Thanks!
Dean





All times are GMT +1. The time now is 10:22 AM.

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