What's wrong with this formula (i.e. returning FALSE values)?

BoGuSforLife

New Member
Joined
Jul 17, 2011
Messages
8
=IF(AND('Available ATO Hours'!A:A>=(TODAY()-15),'Available ATO Hours'!A:A<=(TODAY()+15)),SUMIF('Available ATO Hours'!F:F,'ATO Usage'!B:B,'Available ATO Hours'!G:G),0)

For reference:
'Available ATO Hours'!A:A = Various dates
'Available ATO Hours'!F:F = Various names
'ATO Usage'!B:B = Names that can be found in 'Available ATO Hours'!F:F
'Available ATO Hours'!G:G = Various numerical values

Please keep in mind that I am relatively inexperienced with Excel but I have the exact same formula I made in a test sheet before I had the actual data and it works just fine. The only difference is that the data is in different columns but my logical tests are the same.

Any help would be greatly appreciated.
 
Looks like some of the quotes are in the wrong places.

Try this...

=SUMIFS('Available ATO Hours'!G:G,'Available ATO Hours'!A:A,">="&'ATO Usage'!I1,'Available ATO Hours'!A:A,"<="&'ATO Usage'!J1,'Available ATO Hours'!F:F,'ATO Usage'!B2)

This did the trick. I had tried a SUMIFS originally but I was missing the "&" symbols and was unsure about the quotations as well. Would you be able to provide any insight into the proper syntax as far as when to use the "&" symbols? Also, should all criteria be enclosed by quotation marks regardless?
 
Upvote 0

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
This did the trick. I had tried a SUMIFS originally but I was missing the "&" symbols and was unsure about the quotations as well. Would you be able to provide any insight into the proper syntax as far as when to use the "&" symbols? Also, should all criteria be enclosed by quotation marks regardless?
Some examples...

Use the concatenation operator when using comparison operators with cell references or other functions:

=SUMIF(A1:A10,">="&D1,B1:B10)
=SUMIF(A1:A10,"<>"&D1,B1:B10)

=SUMIF(A1:A10,">="&TODAY(),B1:B10)
=SUMIF(A1:A10,"<"&DATE(2011,1,15),B1:B10)
=SUMIF(A1:A10,">"&MAX(D1:D5),B1:B10)

Use quotes on the comparison operators (as above) and any hardcoded text:

=SUMIF(A1:A10,"Tom",B1:B10)
=SUMIF(A1:A10,"",B1:B10)
=SUMIF(A1:A10,"<>North",B1:B10)
=SUMIF(A1:A10,"*",B1:B10)

That last example is using the asterisk wildcard which, in this application, means ANY text.

Do not quote numbers.

=SUMIF(A1:A10,10,B1:B10)
 
Last edited:
Upvote 0
Some examples...

Use the concatenation operator when using comparison operators with cell references or other functions:

=SUMIF(A1:A10,">="&D1,B1:B10)
=SUMIF(A1:A10,"<>"&D1,B1:B10)

=SUMIF(A1:A10,">="&TODAY(),B1:B10)
=SUMIF(A1:A10,"<"&DATE(2011,1,15),B1:B10)
=SUMIF(A1:A10,">"&MAX(D1:D5),B1:B10)

Use quotes on the comparison operators (as above) and any hardcoded text:

=SUMIF(A1:A10,"Tom",B1:B10)
=SUMIF(A1:A10,"",B1:B10)
=SUMIF(A1:A10,"<>North",B1:B10)
=SUMIF(A1:A10,"*",B1:B10)

That last example is using the asterisk wildcard which, in this application, means ANY text.

Do not quote numbers.

=SUMIF(A1:A10,10,B1:B10)

Thank you so much for all of your assistance. You truly went above and beyond.
 
Upvote 0

Forum statistics

Threads
1,225,156
Messages
6,183,230
Members
453,152
Latest member
ChrisMd

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top